I'm a little new to c++ in visual studio, and I'm trying to compile a massive C++ project with Visual Studio. I've gone through and added all source and header files to my project and also updated all of the include paths in the project properties.
If I have the type of project set to "Static Library (.Lib)" the project will compile without error and I'll have a nice fatty .lib file.
If I change the project over to a "Dynamic Library (.dll)" The project no longer compiles and fails on linking errors.
Here's an example of one:
Error 27 error LNK2001: unresolved external symbol "char const * __cdecl Project::toString(enum Project::compMode)" (?toString@Project@@$$FYAPBDW4compMode@1@@Z) H:\repo.project\user\tool\component.obj tool
Any help or background on what might be happening here?
Check if you defined the following member function
char const* Project::toString(Project::compMode)
When you compile as a static library an unresolved symbol is not an error, because it can be resolved later when you link with other code.
You may have forgotten to add some .cpp file to your project.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With