Linking in Visual Studio 2010 Professional

After performing the configuration and generation steps with CMake, and building the solutions (did it for both static and shared libraries, in Debug and Release, though now I know there isn't a difference) I copied and pasted the Box2D.lib and Box2D.dll files to a Box2D/lib folder.

In VS, for my project I've added the Box2D/lib directory as an additional library directory in the configuration option 'VC++ Directories' for both Debug and Release configurations. Under the Linker tab I've put Box2D.lib as an additional dependency for both configurations. I've also copied the dll to the same folder as the binary.

However, I still get an unresolved external symbol error. What am I missing?

Code:
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall b2World::~b2World(void)" (??1b2World@@QAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall b2World::b2World(struct b2Vec2 const &,bool)" (??0b2World@@QAE@ABUb2Vec2@@_N@Z) referenced in function _main


Edit: Problem was I had compiled without setting Testbed or HelloWorld as the startup project.
Edit:

So I've tried a bunch of different configurations. What I want is to dynamically link for Debug and statically link for Release. Thus, with HelloWorld as the startup project, I compiled and linked in Debug with \MDd and in Release as \MT. Of course, it works if I compile it with \MD, but then I can't use \MT in my project!

Code:
Trying to run HelloWorld with \MT gives the following errors...
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _malloc already defined in LIBCMT.lib(malloc.obj)
1>MSVCRT.lib(MSVCR100.dll) : error LNK2005: _free already defined in LIBCMT.lib(free.obj)
1>MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
1>MSVCRT.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0@ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>C:\Users\Alex\Dev\Box2D\Box2D_v2.1.2\Box2D\Build\HelloWorld\Release\HelloWorld.exe : fatal error LNK1169: one or more multiply defined symbols found
So I was able to do it by changing ALL of the projects in the Release configuration for Box2D to \MT. Before I was only changing HelloWorld's RunTime library. Now everything works perfectly. 🙂

Original thread: https://box2d.org/forum/viewtopic.php?t=7149