Trouble upgrading a managed C++ project to VS.NET 2005?

Security Briefs

Syndication

If you're seeing unresolved externals for static ctors (like the one below), you likely need to add the CRT libraries (msvcmrt.lib msvcrt.lib) to your project as additional dependencies (besides mscoree.lib). You can do this via the MC++ property sheet on the Linker|Input page.

Error 1 error LNK2001: unresolved external symbol "?.cctor@@$$FYMXXZ"

I'm blogging this so I don't forget - I've run into this on numerous occasions. Here's the original post where I found the solution. Hope this saves somebody some frustration!


Posted Feb 21 2006, 04:03 PM by keith-brown
Filed under:

Comments

Mike wrote re: Trouble upgrading a managed C++ project to VS.NET 2005?
on 06-30-2006 9:28 AM
Yes, it just saved me from pulling what's left of my hair out.

Thanks,

Mike.
-chas- wrote re: Trouble upgrading a managed C++ project to VS.NET 2005?
on 05-06-2008 12:53 PM
Thanks heaps! I had msvcrt.lib but not msvcmrt.lib. It did save me alot of time! Thanks for taking the time to post this!

-chas-
Gregory Vangilbergen wrote re: Trouble upgrading a managed C++ project to VS.NET 2005?
on 05-28-2008 12:02 AM
Thank you very much, searched for hours. The msvcrt.lib was in there after the build in conversion of VS2008, msvcmrt.lib however wasn't. So just adding msvcmrt.lib (release) and msvcmrtd.lib (debug) fixes it.

Add a Comment

(required)  
(optional)
(required)  
Remember Me?