LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
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.

Notices



Reply
 
Search this Thread
Old 09-09-2007, 01:56 PM   #1
arunachalam
Member
 
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,
Arunachalam.
 
Old 09-09-2007, 02:20 PM   #2
wjevans_7d1@yahoo.co
Member
 
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:

Code:
man strip
Hope this helps.
 
  


Reply


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 05:08 AM
Compile C++ in Release vs. Debug Mode Hady Programming 7 06-13-2005 05:00 AM
Quake II stuck in debug mode shortname Linux - Games 1 05-09-2005 09:28 PM
gcc and creating a debug file xviddivxoggmp3 Programming 5 03-16-2004 04:38 PM
DHCP in debug mode lapthorn Linux - Networking 1 12-03-2003 08:22 AM


All times are GMT -5. The time now is 10:20 AM.

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