Mail Archives: djgpp/1998/09/05/15:00:43
From: | "Mario" <antsiva AT club-internet DOT fr>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Problem with the String class
|
Date: | Sat, 5 Sep 1998 20:42:12 +0100
|
Organization: | Club-Internet (France)
|
Lines: | 37
|
Message-ID: | <6ss0uc$gm1$1@front6.grolier.fr>
|
NNTP-Posting-Host: | ppp-104-184.villette.club-internet.fr
|
NNTP-Posting-Date: | 5 Sep 1998 18:46:36 GMT
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Is there someone to help me?
Here is the source of my simple program, that I can't compile with
"gxx -o myprog.exe myprog.cpp"
or "gxx -o myprog.exe myprog.cpp -lgpp"
although I installed all the binaries to my c:\djgpp directory, as described
in the djgpp faq.
/**************************************************************/
#include <_String.h>
int main()
{
String x("Hello, world");
return 0;
}
/**************************************************************/
I get the messages...
c:/djgpp/tmp\cccyaxci(.text+0x2c):myprog.cpp: undefined reference to
`String::Str
ing(char const *)'
c:/djgpp/tmp\cccyaxci(.text+0x3a):myprog.cpp: undefined reference to
`String::~St
ring(void)'
c:/djgpp/tmp\cccyaxci(.text+0x63):myprog.cpp: undefined reference to
`String::~St
ring(void)'
Then I tried to insert "#include <string>: my program above was compiled and
linked correctly(but with warning messages), but I still can't use methods
of String class (downcase,
etc...)
I read the FAQs, but I can't find the solution :-(
- Raw text -