How to cross-compile 64bit DLL with VS 2005 on 32bit computer?

十年热恋 提交于 2020-01-06 03:31:47

问题


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.

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?


回答1:


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.



来源:https://stackoverflow.com/questions/1042453/how-to-cross-compile-64bit-dll-with-vs-2005-on-32bit-computer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!