Skip to main content



      Home
Home » Language IDEs » C / C++ IDE (CDT) » Eclipse CDT stack overflow problem,need help.
Eclipse CDT stack overflow problem,need help. [message #747256] Sun, 23 October 2011 21:29 Go to next message
Eclipse UserFriend
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 05:09 Go to previous messageGo to next message
Eclipse UserFriend
Google for "mingw stack size" gave me this.
http://www.allegro.cc/forums/thread/602743
Re: Eclipse CDT stack overflow problem,need help. [message #749822 is a reply to message #749517] Tue, 25 October 2011 09:12 Go to previous messageGo to next message
Eclipse UserFriend

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 02:59 Go to previous messageGo to next message
Eclipse UserFriend
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
Re: Eclipse CDT stack overflow problem,need help. [message #752371 is a reply to message #751796] Wed, 26 October 2011 07:19 Go to previous messageGo to next message
Eclipse UserFriend
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 03:05 Go to previous message
Eclipse UserFriend
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.
Previous Topic:building with Microsoft Visual C++ toolchain (stderr?)
Next Topic:Debug facilities documetation
Goto Forum:
  


Current Time: Sun Aug 31 11:14:12 EDT 2025

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

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

Back to the top