Monday, March 24, 2008

unresolved external symbol ?.cctor@@$$FYMXXZ

This error is usually related to upgrading Managed C++ project from Visual Studio 2003 to Visual Studio 2005. It is easy to resolve by removing a few options from both the compiler and linker, then recompiling the project. For the compiler remove the /ZI flag (don't confuse with /Zi). In the project properties pages choose "Configuration Properties", then "C/C++", then "Command Line". In the bottom part of the page you'll see "Additional Options". Remove /ZI from there if you have it at all. Next, go to "Linker", then "Command Line". Remove /NOENTRY and /NODEFAULTLIB from there if you have it at all. In all cases make sure you do this for all configurations not just the debug or the release configuration. More details about the context and background are available here.

12 comments:

  1. Thank you very much. Totally accurate help. This is getting rarer, I've noticed :)

    ReplyDelete
  2. Searched MS Knowledgebase all morning, wish I came here first, excellent tip.

    ReplyDelete
  3. Anonymous12:47 AM

    Worked like a charm!

    ReplyDelete
  4. Anonymous2:43 AM

    Thank you

    ReplyDelete
  5. Anonymous5:04 AM

    THANK-YOU!

    ReplyDelete
  6. Anonymous7:02 PM

    This was so helpful. Thank you!

    ReplyDelete
  7. Thanks a ton. Was helpful in migrating to Visual Studio 2010 as well.

    ReplyDelete
  8. Anonymous11:19 AM

    Visual Studio 2010:

    December 2010 ... hello, I'm back!

    None of the above alterations fix this error.

    ReplyDelete
  9. Anonymous2:22 AM

    Very nice help and very easy to understand. Thanks a lot.

    ReplyDelete
  10. Anonymous5:46 AM

    Manni is the MAN !!!!

    ReplyDelete
  11. ...and another happy customer. Thanks, Manni. By the way, I was in your country in February, (north island) and It. Is. Gorgeous. Did the Tongariro Crossing... :-)

    ReplyDelete
  12. Anonymous1:18 AM

    Thanks a lot, I went around in circles for an hour !

    ReplyDelete

All comments, questions and other feedback is much appreciated. Thank you!