"LNK2019: unresolved external symbol ..." on static library chain [closed]
aeon made me realize i need to revise my question.
I have a chain of static c++ libraries that build just fine. For 3 libraries A,B,C ("->" means a dependency): if A->B and A->C than when i build A everything builds successfully.
I'm 开发者_JAVA百科referencing A from a c++ console application and when i build that application i get unresolved symbols from static library B. example: "Error 195 error LNK2019: unresolved external symbol "__declspec(dllimport) public: __cdecl ..."
I'm working with VS2010 and referencing static libraries the new way meaning i'm not adding the libraries to "Additional libraries" but i'm referencing them from the new "References..." option they created on VS2010. explained here: http://qualapps.blogspot.com/2010/04/static-library-dependencies-in-visual.html (I tried referencing using "Additional Dependencies" but got the same results).
Any idea how can i resolve this issue ?!
There is no such thing as a static library chain - a static library does not carry with it information on which libraries it depends. You therefore need to resolve this error by linking with the library that contains the function(s) that cause the error.
Just to get the basics right - make sure all the libraries are in the same location as the console app is, when you run it. However make sure your libraries' paths are all right in the project when you build it.
Sorry but I just noticed that you are using the new way to reference libs, what exactly is this new way? Plz enlighten!
精彩评论