User forums > General (but related to Code::Blocks)

Linker option --stack

(1/1)

tucu:
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.

stahta01:
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.

Navigation

[0] Message Index

Go to full version