Author Topic: Linker option --stack  (Read 4587 times)

tucu

  • Guest
Linker option --stack
« on: November 25, 2012, 07:07:33 am »
Hi,
I'm, having a problem with the following command line:

mingw32-g++.exe -Wl,--stack=1048576 -Wall -O2 -o source source.cpp

So, I tried to limit the stack size. It doesn't work like this, ie the output is produced, but without any limitation for stack size.
Instead,  if I remove the -O2 compiler option, it works fine, in the sense that the stack size is correctly limited.
I also tried to use g++.exe instead of  mingw32-g++.exe, with the same results.

How can I deal with the problem, since I need both --stack linker option and -O2 compiler option.

Thanks in advance.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Linker option --stack
« Reply #1 on: November 25, 2012, 07:17:49 am »
Get a different Compiler/Linker.

Edit: Since, this is NOT a Code::Blocks question, it is off topic and likely will be locked or deleted.

Tim S.
« Last Edit: November 25, 2012, 07:28:46 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org