LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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, 12: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, 01:20 PM   #2
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 31
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.
 
1 members found this post helpful.
  


Reply



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:39 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
Open Source Consulting | Domain Registration