Mail Archives: djgpp/1996/09/01/03:48:12
Xref: | news2.mv.net comp.os.msdos.djgpp:8137
|
From: | "John M. Aldrich" <fighteer AT cs DOT com>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Re: Problems with c++ library
|
Date: | Sun, 01 Sep 1996 02:55:45 -0700
|
Organization: | Three pounds of chaos and a pinch of salt
|
Lines: | 48
|
Message-ID: | <32295DA1.7B9A@cs.com>
|
References: | <50ad0d$9ri AT newsbf02 DOT news DOT aol DOT com>
|
NNTP-Posting-Host: | ppp212.cs.com
|
Mime-Version: | 1.0
|
To: | MIKEJAEKEL <mikejaekel AT aol DOT com>
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
MIKEJAEKEL wrote:
>
> Here is the output:
> //test.cc(.text+0x22): undefined referenz to 'cout'
> //test.cc(.text+0x27): undefined referenz to 'ostream::operator<<char
> const *)'
These indicate that you are not linking the C++ libraries when you
compile your program. The compiler by default only searches the C
libraries unless you do one of two things:
1) add -lgpp to the END of your gcc command line.
2) use 'gxx' instead of 'gcc', which causes the C++ libraries to be
searched automatically for you.
Unlike with C, where just about everything can be found in libc.a,
C++ is a changing, diverse programming environment and many features
can often be found strewn around several different libraries. In
particular, the use of some C++ functions requires the linking of
libstdcx.a (with the -lstdcx parameter), because gxx does not by
default do this (should be corrected in the next djgpp version).
> Please help me. Where will I found additional informations for future
> problems?
You can download the DJGPP Frequently Asked Questions list from your
local SimTel mirror. It answers 99% of the newbie questions that get
posted on the list (for example, that particular one is in section 8.7).
In order to read the hypertext version of the docs, you will need to
get the 'info.exe' program found in the file txi360b.zip if you don't
already have it. Once you do, simply type 'info faq' to read it.
Here are the full pointers:
ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2/faq201b.zip
ftp://ftp.simtel.net/pub/simtelnet/gnu/djgpp/v2gnu/txi360b.zip
Good luck!
--
John M. Aldrich, aka Fighteer I <fighteer AT cs DOT com>
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS d- s+:- a-->? c++>$ U@>++$ p>+ L>++ E>+ W+>++ N++ o+ K? w(---) O-
M-- V? PS+ PE Y+ PGP- t+(-) 5- X- R+ tv+() b+++ DI++ D++ G e(*)>++++
h!() !r !y+()
------END GEEK CODE BLOCK------
- Raw text -