简体   繁体   English

将32位VS 2003项目编译为64位

[英]Compile 32 bit VS 2003 project to 64 bit

I currently have a 32 bit dll that was created with Visual Studio 2003 in C++ using Managed Extensions . 我目前有一个32位dll,是使用受管扩展使用C ++在Visual Studio 2003中创建的。 I'm now trying to compile a 64 bit version without having to upgrade to C++/CLI. 我现在正在尝试编译64位版本,而不必升级到C ++ / CLI。 I've been following the tutorial at this location . 我一直在此位置关注本教程。 I'm getting the following error: 我收到以下错误:

fatal error C1197: cannot reference 'c:\\windows\\microsoft.net\\framework\\v1.1.4322\\mscorlib.dll' as the progam has already referenced 'c:\\windows\\microsoft.net\\framework\\v2.0.50727\\mscorlib.dll' 致命错误C1197:无法引用'c:\\ windows \\ microsoft.net \\ framework \\ v1.1.4322 \\ mscorlib.dll',因为程序已引用'c:\\ windows \\ microsoft.net \\ framework \\ v2.0.50727 \\ mscorlib。 dll”

I can't figure out what is referencing the .NET 2.0 version of the dll. 我不知道是什么引用了dll的.NET 2.0版本。

Do you manually call the .dll file in the code? 您是否在代码中手动调用.dll文件? Like in this? 喜欢这个吗?

#using "C:\Windows\Microsoft.NET\Framework\v1.1.4322\mscorlib.dll

If so, you can change this line to just: 如果是这样,您可以将此行更改为:

#using "mscorlib.dll"

Are you including a library that links to a different version of mscorlib? 您是否包括链接到其他版本的mscorlib的库?

Are you specifying both the /clr option and doing a #using "mscorlib.dll" ? 您是否同时指定/ clr选项并使用#ms“ mscorlib.dll”?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM