0

I installed libraries from libharu.org accordingly to the instructions on the page(without any errors). Then tried to run an example in qt5. After adding paths to installed directories

INCLUDEPATH +=/usr/local/include
LIBS +=/usr/local/lib -libhpdf

qt5 seemed to found them (headers underline disappeared). However during debug it shows errors

cannot find /usr/local/lib: File format not recognized
cannot find -libhpdf

with

LIBS += -L/usr/... 

instead gives errors with every libharu header undefined reference to HPDF_xxx

Kuba hasn't forgotten Monica
  • 92,715
  • 14
  • 137
  • 288
murnko
  • 127
  • 1
  • 8
  • I am not sure; but what about `INCLUDEPATH +=/usr/local/include` and `LIBS +=-L/usr/local/lib -lhpdf` note that I used `-lhpdf` instead of `-libhpdf` and ensure that file `hpdf.a` exists in the mentioned path. – houssam May 20 '15 at 17:35
  • It worked. Thank you! :) – murnko May 20 '15 at 18:01
  • you are welcome.. I hope to accept the answer below. – houssam May 20 '15 at 18:30

1 Answers1

2
INCLUDEPATH +=/usr/local/include 
LIBS +=-L/usr/local/lib -lhpdf 

note that I used -lhpdf instead of -libhpdf and ensure that file libhpdf.a exists in the mentioned path. See this answer: How to include needed C library using gcc?

Community
  • 1
  • 1
houssam
  • 1,748
  • 14
  • 27