Error on Linking MSVC++ Projects

Upon successful compilation of builds, the linking process  might stumble upon a linking error. These may happen in the form of unresolved externals or redefinitions.

On unresolved externals: make sure all of the dll or lib exists. Also check the code generation property and select the appropriate options. Make sure all projects use the same code generation correspondingly.

On redefinitions, I had to ignore one of the libraries which caused the redefinition. For instance, in my project, I had to ignore these libraries for the release build :libcmtd.lib;libc.lib;nafxcw.lib;msvcrtd.lib;msvcrt.lib

And these for debug build:
libcmt.lib;libc.lib;nafxcwd.lib;msvcrtd.lib

Would be grateful for enlightenments on further details of those libraries. I could’ve saved hours on solving the linking errors.

PS: Don’t forget to set EMBED MANIFEST to yes when using non DLL settings. Found this out the hard way.

Posted on February 24, 2010, in Programming. Bookmark the permalink. Leave a comment.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: