I have a C++ .h and .cpp file from another project that I want to include into my project. I don't want to copy the files over into my project since I want any changes to those files be applied to both projects.
I've included the directory of the file's folder in the Properties → VC++ Directories → Include Directories.
I've also included the folder in the Properties → C/C++ → General → Additional Include Directories.
The .h files seem to work. If I rename the include to anything other than #include "myfile.h", The cpp file gets unknown definitions.
When I compile. The error is:
fatal error C1083: Cannot open source file: '..\..\..\..\..\..\my project\myfile.cpp': No such file or directory
If I remove the cpp file from the project. Then I get a long list of unresolved functions.
error LNK2019: unresolved external symbol "public: unsigned long __thiscall myclass::myfunction"
How can I include both the .h and .cpp file into my second project?