*BSD News Article 83975


Return to BSD News archive

Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.mira.net.au!pumpkin.pangea.ca!eru.mt.luth.se!www.nntp.primenet.com!nntp.primenet.com!dciteleport.com!newsfeed.internetmci.com!feed1.news.erols.com!news.idt.net!news.bbnplanet.com!cam-news-hub1.bbnplanet.com!uunet!in2.uu.net!129.33.24.22!fox.almaden.ibm.com!garlic.com!news.scruz.net!not-for-mail
From: bill@qstools.com (Bill Cox)
Newsgroups: comp.unix.bsd.freebsd.misc
Subject: Re: g++ Compiler
Date: 30 Nov 1996 23:22:14 GMT
Organization: Sirius Cybernetics, Sirius City branch
Lines: 31
Message-ID: <57qfj6$dn3@news.scruz.net>
References: <01bbdf09$c9cee5e0$91b52399@b082>
NNTP-Posting-Host: 205.179.159.64
X-Newsreader: TIN [UNIX 1.3 950515BETA PL0]

Fadi (fkaddoura@mail.utexas.edu) wrote:
: Hi
: I'm looking for a manual or a refrence for compiling C/C++ Under
: Unix, i.e   compiler flags, how to run debugger etc.....
: I'd really appreciate any help

First of all, see the info files which come with the
compiler.  You can view them with the info command or
M-x info within emacs.

A minimal command would look like this:

	g++ -o hello hello.cpp

To add debugging symbols and optimization:

	g++ -g -O2 -o hello hello.cpp

The debugger is likely to be gdb.  You can debug the above
executable with the command:
	
	gdb hello
	gdb> run

Or, better yet, use the gdb command within emacs, and get
a source-code window showing your current source line.

E-mail if you're still curious..
-- 
Bill Cox                          Software Janitor
Finger bill@thuvia.qstools.com for PGP public key.