【问题标题】:Compile 32 bit VS 2003 project to 64 bit将 32 位 VS 2003 项目编译为 64 位
【发布时间】:2008-11-05 13:37:22
【问题描述】:

我目前有一个 32 位 dll,它是使用 C++ 中的 Visual Studio 2003 使用 Managed Extensions 创建的。我现在正在尝试编译 64 位版本,而无需升级到 C++/CLI。我一直在关注this location 的教程。我收到以下错误:

致命错误 C1197: 不能参考 'c:\windows\microsoft.net\framework\v1.1.4322\mscorlib.dll' 正如节目已经提到的 'c:\windows\microsoft.net\framework\v2.0.50727\mscorlib.dll'

我不知道是什么在引用 .NET 2.0 版本的 dll。

【问题讨论】:

  • 64 位 VS2003? VS2003没有64位交叉编译器?!?
  • 确实如此。显然,您可以下载 Platform SDK(包含 64 位编译器)并在 VS2003 中编译它(前提是您使用正确的环境变量启动它)。

标签: c++ 64-bit visual-studio-2003 managed-extensions


【解决方案1】:

您是否在代码中手动调用 .dll 文件?像这样?

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

如果是这样,您可以将此行更改为:

#using "mscorlib.dll"

【讨论】:

  • 无论我指定完整路径、'#using "mscorlib.dll"'、'#using ' 还是完全省略都会发生这种情况。
【解决方案2】:

您是否包含链接到不同版本的 mscorlib 的库?

您是否同时指定 /clr 选项并执行 #using "mscorlib.dll" ?

【讨论】:

    猜你喜欢
    • 2012-01-21
    • 2011-05-01
    • 1970-01-01
    • 2018-08-04
    • 2019-05-01
    • 1970-01-01
    • 2011-04-12
    • 1970-01-01
    • 2017-08-03
    相关资源
    最近更新 更多