As in the title, I'm receiving unresolved external symbol linker errors. I've tried to fix these errors but failed to do so.
Here's what I've done so far: 1) Link the library as an additional dependency.
2) Added the library's headers in the Include Directories.
3) Set the Additional Library Directories to the location of my library.
4) Include the headers for the library.
5) Set the Library Directories to the location of my library.
I've done all of these and Visual C++ still cannot find my code definitions.
I've even tried using #pragma comment( lib, <Library_Name> ).
Any suggestions?
Additional notes:
Microsoft say that encasing the library name in a pragma directive will cause a linker error. This proved correct as I received the linker error.
Examine the libraries and check that they do actually contain the functions you're trying to link to. Under *.nix I'd use the nm command; presumably there's an equivalent under Win.
Are you only having problems with a specific library or are you unable to link to any?
Also, did you try compiling from code::blocks (or anything else) ?
It was the one specific library. I solved the errors anyway.
It appears as though template structures were the culprit. The template structures' members were defined in separate source files. This is what the linker errors were referring to. So I placed the method definitions inside the header where the template structures were defined.
And now, the link was successful.
If anybody else has this problem in the future, I recommend reading the above link( in my previous post ). The link teach you how to reference projects so they link successfully.