Reputation: 1564
I have an object file library that exists as a standalone VC++
project. I have a number of other completely separate VC++
solutions, and I would like some of them to utilise the classes included in this library.
I have added the project to a solution as detailed here: (See docs). I have followed all of the instructions but am still getting "unresolved external symbol"
errors when trying to use the class.
Can anyone help?
Specifics: The class library in question is an SQL access library. Inside there are two files, sql.h and sql.cpp. Pretty simple. That project compiles itself absolutely fine, so I know there is nothing wrong with that project. I was under the impression that to get the project included in an existing solution I had to:
#include "sql.h"
to the projectThat is what I have done, to no success.
Upvotes: 1
Views: 126
Reputation: 1281
Please make sure the external library is linked into your project. It usually comes in a form of a .lib file (for example, sql.lib) Go to Configuration Properties ->Linker and add your library to the "Additional Dependencies" list.
Upvotes: 1