Linking Static Library with Qt Creator
Hi all,
I got a 3rd Party Static library (.lib) and relevant header file with functions. No dll is provided.
I have included the lib with Qt Creator and it could successfully locate the library. But the function call specified with the library called from my program provides me Linker error unresolved external symbol error as below
mainwindow.obj : error LNK2019: unresolved external symbol "unsigned char __cdecl cio_init(unsigned char)" (?cio_init@@YAEE@Z) referenced in function "public: __thiscall MainWindow::MainWindow(class QWidget *)" (??0MainWindow@@QAE@PAVQWidget@@@Z)
release\CioTestX86.exe : fatal error LNK1120: 1 unresolved externals
The same library and header file works in VS2010 IDE.
Need some inputs to solve the above error . Whether i have to use cmake instead of qmake ? Please support.
Re: Linking Static Library with Qt Creator
What compiler are you using?
Tools->options->Build&Run-> Qt Versions
I assume you are compiling with MinGW and linking libraries build with visual studio 2010
Re: Linking Static Library with Qt Creator
Hi scarecr0w132
i am compiling with visual studio x86 compiler .
Re: Linking Static Library with Qt Creator
Quote:
Originally Posted by
augusbas
Hi scarecr0w132
i am compiling with visual studio x86 compiler .
visual studio 2010 compiler?
lnk errors can come from different versions of visual studio