Link to home
Start Free TrialLog in
Avatar of chubbycuban
chubbycuban

asked on

"Unresolved external symbols" Using libtiff library in OpenGL using Qt and MS Visual Studio/ C++.

In building my project I get the errors below.

I've never used the Libtiff library before. Please help!
glwidget.obj : error LNK2019: unresolved external symbol _TIFFRGBAImageEnd referenced in function "public: int __thiscall GLWidget::readTiffImage(char *,unsigned int *)" (?readTiffImage@GLWidget@@QAEHPADPAI@Z)
1>glwidget.obj : error LNK2019: unresolved external symbol _TIFFError referenced in function "public: int __thiscall GLWidget::readTiffImage(char *,unsigned int *)" (?readTiffImage@GLWidget@@QAEHPADPAI@Z)
1>glwidget.obj : error LNK2019: unresolved external symbol _TIFFRGBAImageGet referenced in function "public: int __thiscall GLWidget::readTiffImage(char *,unsigned int *)" (?readTiffImage@GLWidget@@QAEHPADPAI@Z)
1>glwidget.obj : error LNK2019: unresolved external symbol __TIFFmalloc referenced in function "public: int __thiscall GLWidget::readTiffImage(char *,unsigned int *)" (?readTiffImage@GLWidget@@QAEHPADPAI@Z)
1>glwidget.obj : error LNK2019: unresolved external symbol _TIFFRGBAImageBegin referenced in function "public: int __thiscall GLWidget::readTiffImage(char *,unsigned int *)" (?readTiffImage@GLWidget@@QAEHPADPAI@Z)
1>glwidget.obj : error LNK2019: unresolved external symbol _TIFFOpen referenced in function "public: int __thiscall GLWidget::readTiffImage(char *,unsigned int *)" (?readTiffImage@GLWidget@@QAEHPADPAI@Z)

Open in new window

Avatar of jkr
jkr
Flag of Germany image

You need to add the library to your project - either do that via "Priject|Add existing Item", navigate to the lub and select it or add

#pragma comment(lib,"libtiff.lib")

to one of your source code files.
ASKER CERTIFIED SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of chubbycuban
chubbycuban

ASKER

I tried the third way and I get cannot open libtiff.lib. Where is it suppose to be? Please be patient, I'm fairly new to Visual Studio.
Also, when I do it the first way... I am asked to create a new rule and I don't know where to go from there
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
BTW, if you need CVS to check that out, that's available from http://www.nongnu.org/cvs/ - you might also find http://www.wincvs.org/ usefule.
ok... I stuck with the third way and it worked!

The other error was because I had the root folder in the Additional Library Directories instead of the libtiff folder.

Thanks!
You're most welcome ;o)