delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/01/21:01:39

From: mimo AT gewi DOT kfunigraz DOT ac DOT at (mimo)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: [Q] c++ library error...
Date: Fri, 01 May 1998 20:58:46 GMT
Organization: MimoLand
Lines: 58
Message-ID: <354a3032.12510072@news.kfunigraz.ac.at>
References: <35455695 DOT 6E201906 AT cais DOT kaist DOT ac DOT kr> <01bd7348$35acd280$2cc809c0 AT chessa>
NNTP-Posting-Host: 143.50.169.56
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On 29 Apr 1998 08:22:58 GMT, "Alberto Chessa" <fiargbgm AT tin DOT it> wrote:

>
>
>Dan, Ho Jin <naturalis AT cais DOT kaist DOT ac DOT kr> wrote in article
><35455695 DOT 6E201906 AT cais DOT kaist DOT ac DOT kr>...
>> when i compiled a simple c++ program with djgpp, i got the error
>> messages such that
>> 
>> C:\lang\djgpp\work>gcc -lgpp minprint.cpp
>> c:/lang/djgpp/tmp\ccdaaaaa(.text+0x1c4):minprint.cc: undefined reference
>> [...]
>
>Simple use "gxx" instead of "gcc"!
>gxx is the front-end for C++. gcc do not link with the standrd C++ library.

hi,

when i m trying to use libgpp-types like String, strstream i always
get the same linker errors - it looks like this (message):
/*
Creating: smenu.exe
Error: err.o: In function `CErr::Add(char *,...)':
err.cpp(16) Error: undefined reference to `String::operator+=(char)'
err.cpp(25) Error: undefined reference to `String::operator+=(char
const *)'
err.cpp(28) Error: undefined reference to `String::operator+=(char)'
err.cpp(34) Error: undefined reference to `String::operator+=(char)'
Error: err.o: In function `CErr::operator<<(int *)':
err.cpp(4) Error: undefined reference to `String::operator+=(char)'
Error: err.o: In function `CErr::operator<<(int)':
Error: err.cpp(.text+0x7b7): undefined reference to
`String::operator+=(char)'
Error: err.o: In function `CErr::operator<<(char *)':
Error: err.cpp(.text+0x7e4): undefined reference to
`String::operator+=(char const *)'
Error: err.o: In function `CErrObj::CErrObj(void)':
Error: err.cpp(.text+0x8bc): undefined reference to
`String::String(void)'
Error: err.cpp(.text+0x8db): undefined reference to
`String::~String(void)'
Error: err.o: In function `CErrObj::~CErrObj(void)':
Error: err.cpp(.text+0x91e): undefined reference to
`String::~String(void)'
There were some errors
*/
i dont understand these errors, because i lokked into the libgpp.a and
found string.o with the above listed references. i also tried using
gxx (resp. g++) instead of gcc, but problems stay.

i downloaded ver 2.80 from ftp.univie.ac.at (simtel-mirror) by first
using delories zip picker and rhide1.4. my systeme is running on dos.
am i missing any libraries (i also tried listing the gpp explicitly in
the libraries-dialog)?
if you have any idea, i d be really happy....

mimo

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019