在Windows 2000中使用Visual Studio 2010编译C ++ DLL的问题 [英] Issue using Visual Studio 2010 compiled C++ DLL in Windows 2000

查看:116
本文介绍了在Windows 2000中使用Visual Studio 2010编译C ++ DLL的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

解决方案

Visual Studio 2010无法构建在Windows 2000上运行的二进制文件。实际上比这更糟糕,

如果要支持早期版本,您似乎坚持使用安装VS2008构建的Windows。您可以将整个项目移动到Visual Studio 2008,也可以从Visual Studio 2010项目中定位vc90(Visual Studio 2008)工具集。有关后一种方法的更多详细信息,请参阅我的相关问题此处


I have a very simple DLL written in unmanaged C++ that I access from my application. I recently switch to Visual Studio 2010, and the DLL went from 55k down to 35k with no code changes, and now it will no longer load in Windows 2000. I didn't change any code or compiler settings. I have my defines setup for 0x0500, which should include Windows 2000 support. Has anyone else run into this, or have any ideas of what I can do?

解决方案

Visual Studio 2010 cannot build binaries that run on Windows 2000. It's actually even worse than that, they won't run on Windows XP RTM or Windows XP Service Pack 1 either. This is because VS2010's C runtime library requires the EncodePointer API which is not available until SP2.

It appears you're stuck building with installing VS2008 if you want to support earlier versions of Windows. You can either move your entire project to Visual Studio 2008 or you can target the vc90 (Visual Studio 2008) toolset from within your Visual Studio 2010 projects. For more details on the latter method, see this anwser to my related question here.

这篇关于在Windows 2000中使用Visual Studio 2010编译C ++ DLL的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆