I want to increase the stack size of my program because I have a complex recursive algorithm it would be a REAL pain to rewrite iteratively.
I am using GCC C++ 4.6.2. MinGw, building with a Qt .pro file (I'm using Qt for the GUI front end), on Vista.
Advice on this website is to use:-
gcc -Wl,--stack,4194304
and to send this to the g++ link phase with:-
LIB += -Wl,--stack,4194304
but the linker errors with:-
g++: error: unrecognized option '--stack,4194304'
I have tried sending the options to the compile phase with QMAKE_CXXFLAGS += but g++ still barfs.
The only option that does not barf is -fno-stack-limit from the GCC documentation (.pdf 4.5.0, p.260), but my stack still overflows. The other options mentioned in that para. barf.