Re: Linux C++ compiler

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

 



Matt Smith wrote:
> 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
>
> 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
>>
>>
>> Peter
>> --
>> 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
>>     
Hi Matt,

You missed(/ignored?) part of the command that Peter gave you. The 
complete command is:

g++ -o executable program.cc

You use the -o option to tell it what to call the program file. 
Otherwise, you get a file "a.out", as you discovered. You could of 
course always rename the a.out file to  what ever you like.  Best of luck!

-David C.
-- 
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