I am trying to compile a program that was provided to me. The program tests the run time of the algorithm quicksort when provided different values. I need to increase the size of the stack to run really large numbers.
I read to use the following command: g++ -Wl,--stack,<size>
where size is the number to increase the stack.
However, this isn't working for me. In command prompt when I typed exactly the following:
g++ -Wl,--stack,1000000000
and then hit enter, I get the following message:
C:/mingw/bin/../lib/gcc/mingw32/5.3.0/../../../libmingw32.a(main.o):(.text.startup+0xa0): undefined reference to 'WinMain@16' collect2.exe: error: ld returned 1 exit status
I am not allowed to change the code so my only option is to increase the stack size in command prompt and then run my code.
I don't know what I am doing wrong. Am I typing in the command incorrectly?
How do I increase the stack size in command prompt for a c++ program using MinGW compiler? I am using Windows 10, if that information is helpful.