0

I download libharu.zip, try to include it into QT creator c++. But I don't have lib*.a files in libharu. What do I need to do? It has some makefiles etc.

I find some info about makefile, but don`t understand how it works in QT creator.

nmake -f Makefile.win

What do I need to run this command?

Usagi
  • 13
  • 3

1 Answers1

-1

You will need a .so or a .a for linking, in qt creator edit your .pro:

INCLUDEPATH     += <path_to_lib>/your_lib_include

When you have a .so for linking:

LIBS += -L<path_to_lib> -l<libname>

When you have a .a for linking:

LIBS += <path_to_lib>/libname.a
msx_br
  • 1
  • I don`t have .a or .so in downloaded zip, this is the problem, I don't know how to compile makefile on windows(or any system) – Usagi Jun 22 '20 at 15:16
  • @Usagi You have to build it https://github.com/libharu/libharu/wiki/Installation. As far as I saw there are no prebuilt libraries. – Thomas Sablik Jun 22 '20 at 15:40
  • I found where I need to type these commands and get this. Visual Studio 2019 Developer Command Prompt v16.6.2. And get this: NMAKE : fatal error U1073: don't know how to make 'src\hpdf_utils.obj' Stop. – Usagi Jun 22 '20 at 16:25
  • Can you edit your question to provide a more clear what you're trying to achieve, Quoting libharu: **"Haru can work as both a static-library (.a, .lib) and a shared-library (.so, .dll).** So your question must be "How to compile libharu in windows and integrate with Qt" – msx_br Jun 22 '20 at 21:08