Problems referencing libraries on W7
-
Hello All
I could use some help getting my App to reference a library. Thanks in advance:
First:
OS: W7, 64bit
Qt 5.5 for VS 2013 w/Creator 3.4.2
Visual Studio 2013I created a library with VS2013 followig the pattern outlined here:
https://msdn.microsoft.com/en-us/library/ms235627(v=vs.120).aspxFollowing Qt documetntation (http://doc.qt.io/qt-5/third-party-libraries.html), I added the following line to my *.pro file
LIBS += -L"C:\Users\xxxxxxxx\Documents\CASES_PC\CPP\lib\static" -lVS_casesIO
(the actual library name is VS_casesIO.lib)I ran Qmake. There were no errors or warning from this process that I could see.
When I tried to run I got:
prjpath.obj:-1: error: LNK2001: unresolved external symbol "public: __cdecl PrjFilePath::PrjFilePath(char const *)" (??0PrjFilePath@@QEAA@PEBD@Z)What am I doing wrong? Thanks to all.
-
@towtruck
You need to add your static library to PRE_TARGETDEPS. -
Hi,
Maybe a silly question but, are you sure that the library and Qt are build for the same architecture ? 32 vs 64 bit.
-
Something's not clear here, in your first post you wrote that you where using Visual Studio 2013, did you change in between ?
You can check the architecture in your project's settings or using a tool like Dependency Walker.
-
Indeed it is. Therefore is VS_casesIO.lib also 64bit ?
-
Then get Dependency Walker, it will be faster. When the library is loaded there's a 64 icon if it's a 64 bit build.