www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/11/25/05:31:02

Newsgroups: comp.os.msdos.djgpp
From: manni AT hotbot DOT com (Manni Heumann)
Subject: Re: Can someone compile this?
References: <73cifb$gqm$1 AT clam DOT niwa DOT cri DOT nz> <19981124 DOT 12323889 AT eev6 DOT eev> <365B1A1A DOT 771B6BAE AT earthlink DOT net>
X-Newsreader: News Xpress 2.01
Date: Wed, 25 Nov 1998 10:23:39 GMT
NNTP-Posting-Host: dhcp33-242.uni-bielefeld.de
Message-ID: <365bdab0.0@news.uni-bielefeld.de>
X-Trace: 25 Nov 1998 11:23:44 +0200, dhcp33-242.uni-bielefeld.de
Lines: 61
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

Hi Michael and all you others!

I thought this was a simple problem: Just link with libgpp and that's it.
So I compiled Michael's program with my usual commandline and it did compile 
without errors or warnings. However, I tried to break the commandline down to 
the necessary arguments and I typed:

gxx TEST.cc -lgpp

But this resulted in:

f:/cccqcctf(.text+0x1e):TEST.cc: undefined reference to 
`String::operator=(char const *)'
f:/cccqcctf(.text+0x6b):TEST.cc: undefined reference to String::~String(void)'
f:/cccqcctf(.text+0x8a):TEST.cc: undefined reference to `String::String(char 
const *)'

So I got back to my original call to gxx and found out that I had to compile 
it with some optimizations to make it work:

So 

gxx test.cc -lgpp -O

will work.

What is going on here?

Manni Heumann,
Bielefeld, Germany




>Michael Schuster wrote:
>> 
>> Hi everyone!
>> 
>> I'm desperately searching for a bug in my new 2.8.1 djgpp
>> installation, but cannot find it.
>> 
>> The problem I face is the damn old String class problem which I posted
>> already 2 times.
>> As I want to know, if I do something wrong, I ask you if someone with
>> a 2.8.1  can compile the following little c++ code (which I cnly can
>> compile with my 2.7.xx djgpp?
>> 
>> #include <iostream.h>
>> #include <string.h>
>> #include <_String.h>
>> 
>> String xc="test2";
>> char d[25]="dummy";
>> 
>> int main()
>> {
>>    xc=d;
>>    strcpy(d,xc);
>>    cout<<d;
>> }
>

- Raw text -


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