PDA

View Full Version : How am I supposed to link LibTIFF library?



J. Doe
29th November 2016, 23:11
Hello.

I need to use LibTIFF, because for some reasons QImage isn't an option.

I think that this library is a part of Qt resources (C:\Qt\Qt5.3.2\5.3\Src\qtimageformats\src\3rdparty ), but I cannot link it properly.

Can you explain: what should I write to .pro file to make it work?


INCLUDEPATH += "C:/Qt/Qt5.3.2/5.3/Src/qtimageformats/src/3rdparty/libtiff/libtiff" - I think that's right since this is the directory where all h. files are stored.

But what about
LIBS +=? I didn't see anything with .a extension or lib. extension nearby.

In addition, I should write something to the .ccp file - maybe
#include <tiffio.h>? Or something else?

I'll be thankful for every help attempt.

By the way, there is pri. file (C:\Qt\Qt5.3.2\5.3\Src\qtimageformats\src\3rdparty \libtiff.pri), but if I try to include it (in my .pro file), I get "Project has no top-level .qmake.conf file".

d_stranz
30th November 2016, 16:01
I don't think libTIFF is built for the standard Qt distributions; you will have to build it yourself. There's a .pro file in the qtimageformats "src" directory that should do it. Once you have a .lib and .dll, you link them in as with any other third-party library.