Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Upgrading VC++ project from VS 2008 to VS 2010

I was upgrading a project from VS 2008 to VS 2010. I ran into following unresolved link error.

LINK : error LNK2001: unresolved external symbol __forceCRTManifestCUR

After doing some web search on the error...following link did point me into right direction.

http://social.msdn.microsoft.com/Forums/da-DK/vcgeneral/thread/af6796af-a1bf-4904-9923-15101956d882

But adding "int __forceCRTManifestCUR=0;" this to main file didn't work for me.

What I found out is that my original VS 2008 project properties under Linker->Command Line had additional option of /include:__forceCRTManifestCUR. This option worked fine in VS 2008 build but was giving link error in VS 2010.

After taking out this option, I was able to compile fine in VS 2010.

Question I have is...

  1. What this include option /include:__forceCRTManifestCUR does? and
  2. why it doesn't work in VS 2010?
like image 933
Anant Anand Avatar asked Dec 14 '25 15:12

Anant Anand


1 Answers

Seems you have to write

extern "C" int _forceCRTManifestCUR=0 

for it to work in C++, the original article forgets to mention this.

like image 138
AndersK Avatar answered Dec 19 '25 05:12

AndersK