Linux C++ compiler
Gilboa Davara
gilboad at gmail.com
Sun Jan 24 22:38:45 UTC 2010
On Sun, 2010-01-24 at 15:48 -0500, 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
You're missing the output filename:
$ gcc source_filename.cc -o output_filename
Where output_filename is name of the resulting executable. (Equivalent
to .exe file in Windows/DOS)
If you want to execute the resulting executable, type:
$ ./output_filename
If you want to be able to debug the resulting executable, try:
(Quick and dirty solution)
First, install DDD (simple but effective debugger):
$ su -c 'yum install ddd'
Compile the file with debug information.
$ gcc source_filename.cc -ggdb3 -o output_filename
Start the debugger.
$ ddd ./output_filename
- Gilboa
More information about the users
mailing list