Re: Linux C++ compiler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Peter Langfelder wrote:
> g++ -o executable program.cc

It's a bad idea to use g++ or gcc with no optimization switches as the 
default is no optimization whatsoever. Please use at least -Os (optimize for 
size) or -O2 (optimize for speed (at "level 2"), which is what Fedora is 
using).

You'll probably also want to use -g if you want to be able to use a debugger 
on your executable.

Those are just the basics, gcc/g++ have many useful switches and Fedora uses 
a whole bunch when compiling its packages (and some upstream projects add 
even more).

        Kevin Kofler

-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Communicate/MailingListGuidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux