Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Software
User Name
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.


  Search this Thread
Old 09-09-2007, 12:56 PM   #1
Registered: Sep 2005
Posts: 53

Rep: Reputation: 15
disable debug mode in gcc

hello all,

how to generate an exe in release mode for a C Program, I am using gcc for compilation.

Thanks in advance,
Old 09-09-2007, 01:20 PM   #2
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 30
First, don't use the -g switch when you compile. Avoiding that switch will keep the extra debug information from appearing in the executable file.

Second, you can strip even externally defined globals from the executable file by using the strip command on the executable file after compilation. For more details, do this at the command line:

man strip
Hope this helps.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how do i disable wine debug? dosprompt Linux - Software 5 03-04-2014 04:08 AM
Compile C++ in Release vs. Debug Mode Hady Programming 7 06-13-2005 04:00 AM
Quake II stuck in debug mode shortname Linux - Games 1 05-09-2005 08:28 PM
gcc and creating a debug file xviddivxoggmp3 Programming 5 03-16-2004 03:38 PM
DHCP in debug mode lapthorn Linux - Networking 1 12-03-2003 07:22 AM > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 09:07 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration