如何使用VS 2005的32位计算机上交叉编译64位的DLL? [英] How to cross-compile 64bit DLL with VS 2005 on 32bit computer?

查看:401
本文介绍了如何使用VS 2005的32位计算机上交叉编译64位的DLL?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Visual Studio 2005,我写了一个在C简单的DLL使用Windows API发送UDP数据包,并且挂到一个第三方程序。在64位的机器,它并没有在所有的工作,作为第三方code编译在这种情况下,64位。所以,我要出货两个版本的同一个DLL的 - 一个用于32位,一个是64位

Using Visual Studio 2005, I wrote a simple DLL in C that uses the Windows API to send UDP datagrams and that is hooked into a third-party program. On a 64 bit machine, it does not work at all, as the third-party code was compiled for 64 bit in this case. So I need to ship two versions of the same DLL - one for 32 bit, one for 64 bit.

不过,我没能获得Visual Studio中(32位机器上运行)吐出一个DLL,它不等同于32位版本 - 它似乎是'机'在项目属性设置会被忽略。一位同事告诉我,VS 2008只是拒绝交叉编译在这种情况下。这真的是不可能的呢?

However, I did not manage to get Visual Studio (running on a 32 bit machine) to spit out a DLL that is not identical to the 32 bit version - it seems the 'machine' setting in the project properties is simply ignored. A colleague told me VS 2008 simply refuses to cross-compile in this scenario. Is this really not possible at all?

推荐答案

右键单击该项目在解决方案资源管理器中,然后进入属性/配置管理器/活动解决方案平台:<新建...> / 64 / OK /关闭。然后,在平台选择64,OK,你去好。

Right click the project in the Solution Explorer then go Properties / Configuration Manager / Active Solution platform: <New...> / x64 / OK / Close. Then select x64 in Platform, OK, and you're good to go.

这篇关于如何使用VS 2005的32位计算机上交叉编译64位的DLL?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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