How to Compile C++ programs

John Vetterli jvetterli-zC6tqtfhjqE at public.gmane.org
Thu Oct 14 14:33:42 UTC 2004


On Wed, 13 Oct 2004 12:25:04 -0400
Jing Su <jingsu-26n5VD7DAF2Tm46uYYfjYg at public.gmane.org> wrote:
> have you tried just doing 'gcc fill.cc'?

This won't work: gcc will recognize the .cc extension as
indicating a C++ file, but for the linking stage you need to use g++ so
that the C++ support libraries are included in the link.  Otherwise, you
wind up with a lot of "undefined reference" errors.

JV
-- 
Sylpheed-WARNING **: can't open signature file:
/home/jvetterli/.signature
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list