delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/05/08/07:15:45

From: kma2246454 AT aol DOT com (KMa2246454)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Problem :ld and C++ String class
Lines: 37
Message-ID: <1998050809351700.FAA17768@ladder01.news.aol.com>
NNTP-Posting-Host: ladder01.news.aol.com
Date: 08 May 1998 09:35:17 GMT
Organization: AOL http://www.aol.com
References: <9805051347 DOT AA01679 AT casimir DOT stortek DOT com>
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

>Nobody has any idear to workaroud this problem ?
>I have tried the the 2.7 version and the compilation work fine.

Try compiling with optimization turned on. When I compile using
gcc version 2.8.0, I also get the undefined references. However,
when I compile with optimization, it works:

> gpp -v -O -o stringe stringe.cc -lgpp
Using builtin specs.
gcc version 2.8.0
 c:/djgpp/lib/gcc-lib/djgpp/2.80/cpp.exe -lang-c++ -v -undef -D__GNUC__=2
-D__GNUG__=2 -D__cplusplus -D__GNUC_MINOR__=8 -Dunix -Di386 -DGO32 -DMSDOS
-DDJGPP=2 -D__unix__ -D__i386__ -D__GO32__ -D__MSDOS__ -D__DJGPP__=2 -D__unix
-D__i386 -D__GO32 -D__MSDOS -D__DJGPP=2 -Asystem(unix) -Asystem(msdos)
-Acpu(i386) -Amachine(i386) -D__EXCEPTIONS -D__OPTIMIZE__ -Di386 -Asystem(unix)
-Acpu(i386) -Amachine(i386) -D__i386__ -Asystem(unix) -Acpu(i386)
-Amachine(i386) stringe.cc c:/djgpp/tmp/ccaaaaaa.ii
GNU CPP version 2.8.0 (80386, BSD syntax)
#include "..." search starts here:
#include <...> search starts here:
 c:/djgpp/lang/cxx
 c:/djgpp/include
 c:/djgpp/lang/cxx
 c:/djgpp/lib/gcc-lib/djgpp/2.80/include
 c:/djgpp/include
End of search list.
 c:/djgpp/lib/gcc-lib/djgpp/2.80/cc1plus.exe c:/djgpp/tmp/ccaaaaaa.ii -quiet
-dumpbase stringe.cc -O -version -o c:/djgpp/tmp/ccaaaaaa.s
GNU C++ version 2.8.0 (djgpp) compiled by GNU C version 2.8.0.
 as -o c:/djgpp/tmp/ccaaaaaa1.o c:/djgpp/tmp/ccaaaaaa.s
 ld -o stringe c:/djgpp/lib/crt0.o -Lc:/djgpp/lib/gcc-lib/djgpp/2.80
-Lc:/djgpp/lib c:/djgpp/tmp/ccaaaaaa1.o -lgpp -lstdcxx -lm -lgcc -lc -lgcc

--KG



- Raw text -


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