gpt4 book ai didi

c++ - 在 Windows 2000 中使用 Visual Studio 2010 编译的 C++ DLL 时出现问题

转载 作者:IT老高 更新时间:2023-10-28 22:20:49 29 4
gpt4 key购买 nike

我有一个用非托管 C++ 编写的非常简单的 DLL,我可以从我的应用程序访问它。我最近切换到 Visual Studio 2010,DLL 从 55k 下降到 35k 没有代码更改,现在它不再在 Windows 2000 中加载。我没有更改任何代码或编译器设置。我有我为 0x0500 定义的设置,它应该包括 Windows 2000 支持。有没有其他人遇到过这个问题,或者对我能做什么有任何想法?

最佳答案

Visual Studio 2010 cannot build binaries that run on Windows 2000 .实际上比这更糟糕,they won't run on Windows XP RTM or Windows XP Service Pack 1 either .这是因为 VS2010 的 C 运行时库需要 EncodePointer API,该 API 直到 SP2 才可用。

如果您想支持早期版本的 Windows,您似乎无法安装 VS2008。您可以将整个项目移至 Visual Studio 2008,也可以从 Visual Studio 2010 项目中定位 vc90 (Visual Studio 2008) 工具集。有关后一种方法的更多详细信息,请参阅我的相关问题 here 的此回答。 .

关于c++ - 在 Windows 2000 中使用 Visual Studio 2010 编译的 C++ DLL 时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2664607/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com