How to generate 64-bit Visual Studio projects from qmake

拟墨画扇 提交于 2019-12-23 16:50:04

问题


I am using Qt Creator to create some shared library and application projects so that I can easily build them on Windows and Linux. On Windows, some of us prefer using Visual Studio so I want to generate Visual Studio solution and project files from the Qt .pro files using qmake -tp vc -r file.pro. Everything works exactly as expected except that the generated Visual Studio solution and projects only contain 32-bit build configurations and I need 64-bit configurations. It's not a big deal to create the 64-bit configuration in Visual Studio but it would be an easy step to overlook for somebody. I'm wondering if there's a way to do it automatically by either adding something to my .pro files or as an argument to qmake?


回答1:


Run this command from the Visual Studio Command Shell Native x64.

If you need this functionality in any sort of batch files etc, just invoke appropriate bat file from VS Command Tools, like vcvarsx86_amd64.bat or vcvarsx86.bat to set a proper environment



来源:https://stackoverflow.com/questions/38248343/how-to-generate-64-bit-visual-studio-projects-from-qmake

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