简体   繁体   English

我如何在(64位)Windows上编译c ++以制作64位exe?

[英]How can I compile c++ on (64bit) windows to make a 64bit exe?

Using the g++ compiler that came with code::blocks I can compile 32bit programmes but when I try to compile to a 64bit programme it tells me that 64 bit isn't implemented, even though I have 64bit os. 使用code :: blocks附带的g ++编译器,我可以编译32位程序,但是当我尝试编译为64位程序时,它告诉我即使我有64位os,也未实现64位。

How can I compile c++ to make a 64bit exe? 如何编译C ++来制作64位exe?

Download Microsoft Visual C++, and set the target to 64-bit. 下载Microsoft Visual C ++,并将目标设置为64位。

Why make programming harder than it needs to be? 为什么要使编程变得比需要的难?

如果您不限于gcc,则可以将Visual Studio Express 2010中的Microsoft编译器与Windows SDK结合使用(两者都是免费的),并且可以将Visual C ++项目配置为目标64位平台

Download the 64-bit version of gcc, or recompile it yourself with 64-bit support. 下载gcc的64位版本,或在自己的64位支持下重新编译。

I think mingw comes with a version of gcc that can compile 64-bit binaries. 我认为mingw带有可以编译64位二进制文​​件的gcc版本。

Code:Blocks supports Visual Studio as the compiler, you can download it here http://www.microsoft.com/visualstudio/en-us/products/2010-editions/visual-cpp-express , also the fact you have a 64 bit OS has got nothing to do with whether you can compile 64 but code, it even has nothing to do with the CPU architecture, think about it, you can compile Android code in Linux, OSX and Windows and you are not running on an ARM CPU. 代码:Blocks支持将Visual Studio作为编译器,您可以在此处下载它http://www.microsoft.com/visualstudio/zh-cn/products/2010-editions/visual-cpp-express ,实际上您拥有64位位OS与您是否可以编译64位代码无关,甚至与CPU架构无关,请考虑一下,您可以在Linux,OSX和Windows中编译Android代码,并且您不在ARM上运行中央处理器。 The Code:Blocks page tells you how to configure it to use the MS compiler. “代码:块”页面告诉您如何配置它以使用MS编译器。

If you want the 64 bit compiler you need to install either the SDK or the WDK 如果要使用64位编译器,则需要安装SDKWDK

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM