Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Eclipse CDT stack overflow problem,need help.
Eclipse CDT stack overflow problem,need help. [message #747256] Mon, 24 October 2011 01:29 Go to next message
igoat is currently offline igoatFriend
Messages: 4
Registered: October 2011
Junior Member
Hello everyone, I started using Eclipse CDT (with MinGW on Windows) recently.

I need some very large arrays in my project.
As a result, stack overflow occurred.

In VC6.0, I used to increase the "stack allocation" amount in project->settings->link->output->stack allocation when this happened.
So where do I change the settings in Eclipse? Thanks a lot.

ps: I know there is a way to avoid this. Just use the "new" command to create large arrays and no stack overflow would happen. But I really want to know where I can increase the default stack amount in Eclipse.

Thanks again.
Re: Eclipse CDT stack overflow problem,need help. [message #749517 is a reply to message #747256] Tue, 25 October 2011 09:09 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
Google for "mingw stack size" gave me this.
http://www.allegro.cc/forums/thread/602743


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Eclipse CDT stack overflow problem,need help. [message #749822 is a reply to message #749517] Tue, 25 October 2011 13:12 Go to previous messageGo to next message
igoat is currently offline igoatFriend
Messages: 4
Registered: October 2011
Junior Member

Yeah, I know the command "gcc -Wl,--stack,2097152 XXX.c" would work.
But that was in CMD, I wonder whether there's a way to set the stack size in Eclipse (just like in VC6.0).
But thanks anyway.
Re: Eclipse CDT stack overflow problem,need help. [message #751796 is a reply to message #749822] Wed, 26 October 2011 06:59 Go to previous messageGo to next message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
igoat wrote on Tue, 25 October 2011 15:12

Yeah, I know the command "gcc -Wl,--stack,2097152 XXX.c" would work.
But that was in CMD, I wonder whether there's a way to set the stack size in Eclipse (just like in VC6.0).
But thanks anyway.

These are linker options. You can set them in Eclipse in Project Properties->C/C++Build->Settings


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: Eclipse CDT stack overflow problem,need help. [message #752371 is a reply to message #751796] Wed, 26 October 2011 11:19 Go to previous messageGo to next message
igoat is currently offline igoatFriend
Messages: 4
Registered: October 2011
Junior Member
Oh, I found it.
In Project Properties->C/C++Build->Settings->Tool Settings->MinGW C++ Linker, I found there's a text box called "command" with initially "g++" in it.
So I should just change it into someting like "g++ -Wl,--stack,0xFFFFFF" and all the stack overflow problem can be solved?
Re: Eclipse CDT stack overflow problem,need help. [message #753630 is a reply to message #752371] Fri, 28 October 2011 07:05 Go to previous message
Axel Mueller is currently offline Axel MuellerFriend
Messages: 1973
Registered: July 2009
Senior Member
igoat wrote on Wed, 26 October 2011 13:19
Oh, I found it.
In Project Properties->C/C++Build->Settings->Tool Settings->MinGW C++ Linker, I found there's a text box called "command" with initially "g++" in it.
So I should just change it into someting like "g++ -Wl,--stack,0xFFFFFF" and all the stack overflow problem can be solved?

Yes, but it's better to leave the "command" untouched and add the options to the "Miscellaneous" field of the linker.


Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Previous Topic:building with Microsoft Visual C++ toolchain (stderr?)
Next Topic:Debug facilities documetation
Goto Forum:
  


Current Time: Sat Dec 07 03:33:39 GMT 2024

Powered by FUDForum. Page generated in 0.03042 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top