I am trying to write an application that saves 16 bit tiffs. I use QT Creator and the QT API, but can't use the QT tiff features because of the 16 bit need. My application needs to work in both Windows and Linux.
The Linux version works fine. When I try and link in Visual C++/Win 7, I get the following error messages:
FrameSaveRunnable.obj : error LNK2019: unresolved external symbol __imp_TIFFClose referenced in function "protected: virtual void __cdecl FrameSaveRunnable::run(void)" (?run@FrameSaveRunnable@@MEAAXXZ)
FrameSaveRunnable.obj : error LNK2019: unresolved external symbol __imp_TIFFSetField referenced in function "protected: virtual void __cdecl FrameSaveRunnable::run(void)" (?run@FrameSaveRunnable@@MEAAXXZ)
FrameSaveRunnable.obj : error LNK2019: unresolved external symbol __imp_TIFFWriteScanline referenced in function "protected: virtual void __cdecl FrameSaveRunnable::run(void)" (?run@FrameSaveRunnable@@MEAAXXZ)
FrameSaveRunnable.obj : error LNK2019: unresolved external symbol __imp_TIFFOpen referenced in function "protected: virtual void __cdecl FrameSaveRunnable::run(void)" (?run@FrameSaveRunnable@@MEAAXXZ)
debug\avtcam.exe : fatal error LNK1120: 4 unresolved externals
The relevant parts of my .pro file look like this:
INCLUDEPATH += "C:\Program Files (x86)\GnuWin32\include"
LIBS += -L"C:\Program Files (x86)\GnuWin32\lib" -llibtiff
I have googled and searched all over, and it seems that the problem has to do with C/C++ name incompatabilities. There are some suggestions as to how to fix it inside of Visual Studio, but I am working in the QT environment, and dont use VS at all--just the compiler. Is there an answer to this problem?
My environment: QT 5.4.0, Visual Studio 12, win 7 Pro, libtiff binaries downloaded from http://gnuwin32.sourceforge.net/packages/tiff.htm