Re: Linux C++ compiler



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


--
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



Relevant Pages

  • Re: URGENT
    ... But I've got a pretty good imagination, and may be able to "see" how they'd look in a debugger without actually doing it. ... But as best as I can imagine how the'd work in RosAsm, ... Run the Assembler and this file to read its Source. ... hit (compile & execute in Debugger mode) and then ...
    (alt.lang.asm)
  • Re: only 4k page alignments supported at this time,
    ... I copied the files from my PC to the Target device, ... using activ sync and was able to execute them on the device. ... Copying ...
    (microsoft.public.windowsce.platbuilder)
  • Re: MPC5566 boot code
    ... MPC internal Flash. ... toggle the LED when I remove the debugger. ... to execute properly from the Flash. ...
    (comp.arch.embedded)
  • ntdll.dll unknown error and then os freezes,...
    ... for whatever reason i get a error message like this ... I configured a debugger to ... fine unless you execute it standalone. ... The Hard Hang is the interessting part. ...
    (microsoft.public.vc.mfc)
  • Re: Help for debug a BSOD with microsoft debugging tools
    ... Background information on Stop Error message ... Enquire, plan and execute ... If a kernel debugger is available get the stack backtrace. ... 804e3f93 66813efd02 cmp word ptr,2FDh ds: ...
    (microsoft.public.windowsxp.help_and_support)