Visual C++ Gotchas and Fixes

Link error (error LNK2001)
Link error (error LNK2019)
You fixed the problem but you still get the same errors
311 errors and 325 warnings!
File already exists.
Can't find the header file (fatal error C1083)
Ambiguous symbol (error C2872)
Where's the Link tab?

Link error 2001:
main.obj : error LNK2001: unresolved external symbol "public: __thiscall NodalLoad::NodalLoad
Link error 2019:
openSees error LNK2019: unresolved external symbol "int __cdecl TclModelBuilderVeesCommand(void *,struct Tcl_Interp *,int,..)"
You fixed the problem but you still get the same errors:
Go into the folder where the workspace (file ending in .dsp or .dsw) resides. Delete  the file ending in .ncb
What happens is Bill caches errors he found in the file. Deleting it gives you a fresh build.

311 errors and 325 warnings!:
Try clicking Build-> Execute yourprog.exe
If the linking is set to force, the project may get built and run anyways.

File already exists.
Find where the actual source file is, delete it, and reboot Windows.

Can't find the header file:
ain.cpp(34) : fatal error C1083: Cannot open include file:
Project->Settings->C/C++
choose Preprocessor  from the drop down list.
under Additional Include Directories,
add     .,  at the beginning of the list
(add the current working directory where you just created your new header file!)

error C2872: 'ErrorHandler' : ambiguous symbol
This problem occurs when there is more than one file that declares the type. In my case, both the OpenSees library and the Xerces-c library had declared a class named ErrorHandler. The fix:
  1. wrap one class declaration in, i.e.
    namespace yourspace {
    class ErrorHandler {
    :
    };
    }
  2. declare the instance using scoping, i.e.
    yourspace::ErrorHandler eh;

Where's the Link tab??
If you have a project with subprojects, the subprojects do not have a link tab, only the main project. So set the main project as the active project and link to any libraries you need from there!