codeblocks - compile with large-adress-aware flag

后端 未结 1 1438
清歌不尽
清歌不尽 2021-01-26 14:00

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.

相关标签:
1条回答
  • 2021-01-26 14:58

    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...)

    0 讨论(0)
提交回复
热议问题