Re: Linux C++ compiler

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

 



On Sunday 24 January 2010 20:48:40 Matt Smith wrote:
> On Sun, Jan 24, 2010 at 1:51 PM, Peter Langfelder <
> peter.langfelder@xxxxxxxxx> wrote:
> > On Sun, Jan 24, 2010 at 10:41 AM, Matt Smith <smithm2@xxxxxxxxx> wrote:
> > > using the gcc-c++ compiler can someone provide a simple 3 or 4 step
> >
> > example
> >
> > > as to how i use the compiler (in the terminal) to compile a program i
> >
> > wrote
> >
> > > and saved in a gedit file?  thanks.
> >
> > g++ -o executable program.cc
> >
> > to execute:
> >
> > ./executable
> >
> after typing g++ gedit_file.cc i get a filed name a.out in the same folder
> that is locked.  where do i go from here?  thanks

The "-o" option gives the name to the executable that is generated. If you 
omit it, the executable will get the default name, "a.out". To execute it, 
type

./a.out

Note the dot-slash notation before the filename --- it forces bash to execute 
the a.out command residing in the current directory. Otherwise bash will look 
for a.out in your default $PATH and typically won't be able to find any a.out 
executable.

HTH, :-)
Marko

-- 
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]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux