问题描述
如何使用Codeblocks在 LARGE_ADRESS_AWARE 标志编译32位应用程序?我需要使用比2GB更多的内存。
应该是添加 -Wl, -large-address-aware
到链接标志。我没有使用CodeBlocks,所以不能告诉你如何一步一步做到这一点,但我确定在项目设置中有一个链接选项组件,您可以将该字符串添加到该组件中。
链接器选项:
编辑:当然,如果你有一个足够现代化的gcc-mingw在你的系统上,你应该能够在编译和链接阶段给它-m64,并获得一个原生的64位应用程序,在这一点上,你可以使用尽可能多的内存,只要你喜欢(好吧,直到你耗尽交换空间或48位地址范围,以先到者为准 - 可能交换空间 - 除非你有超过256TB的磁盘空间......)
How can I compile a 32-bit app on a 64-bit system with the LARGE_ADRESS_AWARE
flag using Codeblocks? I need to use more memory than 2GB.
Should be a case of adding -Wl,--large-address-aware
to the linking flags. I don't use CodeBlocks, so can't tell you how you do that step by step, but I'm sure there is a "Linking Options" component in your project settings that you can add this string into.
The Linker options:http://sourceware.org/binutils/docs-2.17/ld/Options.html
Edit: Of course, if you have a modern enough gcc-mingw on your system, you should be able to give it -m64 for the compile and link stages, and get a native 64-bit app, at which point you can use as much memory as you like (well, until you exhaust either swap space or 48 bits of address range, whichever comes first - probably swap space - unless you have more than 256TB of disk-space...)
这篇关于代码块 - 用大地址感知标志进行编译的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!