I've got a VC++ project, and I'm attempting to use the extension of the gumbo-query library, found here. This library wraps/extends Google's gumbo-parser found here. The following is the exact steps I've taken - I'm not very familiar with importing libraries, so I've done what I do to use the Boost libraries:
In Visual Studio (VS Community 2013), under the project settings -> Configuration Properties -> C/C++ -> General I have put the path to a folder that contains all of the source files from both of the projects linked above. Specifically, I placed the .c, .cpp and .h files from the src folder of both projects and referenced these in my projects settings as an include directory.
Following the example file for the project that extends Google's gumbo-parser (found here), I added these two lines to import the library:
#include "Document.h"
#include "Node.h"
At this point, my solution compiles fine. However, continuing to follow the example file, adding the first variable declaration:
CDocument d;
Causes a linker error, as follows:
1>Main.obj : error LNK2028: unresolved token (0A0003B7) "public: __thiscall CDocument::CDocument(void)" (??0CDocument@@$$FQAE@XZ) referenced in function "private: void __clrcall MyApplication::Main::worker_DoWork(class System::Object ^,class System::ComponentModel::DoWorkEventArgs ^)" (?worker_DoWork@Main@MyApplication@@$$FA$AAMXP$AAVObject@System@@P$AAVDoWorkEventArgs@ComponentModel@4@@Z)
1>Main.obj : error LNK2028: unresolved token (0A0003B8) "public: virtual __thiscall CDocument::~CDocument(void)" (??1CDocument@@$$FUAE@XZ) referenced in function "private: void __clrcall MyApplication::Main::worker_DoWork(class System::Object ^,class System::ComponentModel::DoWorkEventArgs ^)" (?worker_DoWork@Main@MyApplication@@$$FA$AAMXP$AAVObject@System@@P$AAVDoWorkEventArgs@ComponentModel@4@@Z)
1>Main.obj : error LNK2019: unresolved external symbol "public: __thiscall CDocument::CDocument(void)" (??0CDocument@@$$FQAE@XZ) referenced in function "private: void __clrcall MyApplication::Main::worker_DoWork(class System::Object ^,class System::ComponentModel::DoWorkEventArgs ^)" (?worker_DoWork@Main@MyApplication@@$$FA$AAMXP$AAVObject@System@@P$AAVDoWorkEventArgs@ComponentModel@4@@Z)
1>Main.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall CDocument::~CDocument(void)" (??1CDocument@@$$FUAE@XZ) referenced in function "private: void __clrcall MyApplication::Main::worker_DoWork(class System::Object ^,class System::ComponentModel::DoWorkEventArgs ^)" (?worker_DoWork@Main@MyApplication@@$$FA$AAMXP$AAVObject@System@@P$AAVDoWorkEventArgs@ComponentModel@4@@Z)
1>..{omitted}..\MyApplication.exe : fatal error LNK1120: 4 unresolved externals
This error appears to occur no matter where I put a CDocument instantiation.
What can I do to rectify this? VS seems to think the includes are fine, and moreso when I put in CDocument d; it lights up to show it recognises the CDocument type.