Mail Archives: djgpp/1999/09/24/07:23:44
From: | bluerv AT my-deja DOT com
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | Bizarre linker problem (2nd try)
|
Date: | Fri, 24 Sep 1999 04:33:35 GMT
|
Organization: | Deja.com - Before you buy.
|
Lines: | 54
|
Message-ID: | <7seuuu$bv4$1@nnrp1.deja.com>
|
NNTP-Posting-Host: | 38.30.171.249
|
X-Article-Creation-Date: | Fri Sep 24 04:33:35 1999 GMT
|
X-Http-User-Agent: | Mozilla/4.0 (compatible; MSIE 5.0; Windows NT; Mozilla/4.0(compatible;MSIE 4.0b1;Windows95);Surfree; DigExt)
|
X-Http-Proxy: | 1.1 x32.deja.com:80 (Squid/1.1.22) for client 38.30.171.249
|
X-MyDeja-Info: | XMYDJUIDbluerv
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
(2nd try...the first try went nowhere but my ISP...sorry if you see
this twice)
I'm getting these bizarre link problems. I'm trying to override the
default behavior of std::basic_string using a character traits. Here's
a small snippet of code:
struct foo : public std::string_char_traits<char>
{
};
typedef basic_string<char, struct foo > CIString;
(of course, in a real implementation "foo" would override behaviors,
but I wanted to simplify the problem.)
and here's the link errors:
gcc -DDGJPP -g -o gw4dos.exe gw4dos.o gw4eng.o mutation.o score.o
utility.o -lstdcx
mutation.o: In function `basic_string<char, foo,
__default_alloc_template<false, 0> >::basic_string(void)':
mutation.cpp:23: undefined reference to `basic_string<char, foo,
__default_alloc_template<false, 0> >::nilRep'
mutation.o: In function `basic_string<char, foo,
__default_alloc_template<false, 0> >::basic_string(char const *)':
mutation.cpp:6: undefined reference to `basic_string<char, foo,
__default_alloc_template<false, 0> >::nilRep'
mutation.o: In function `basic_string<char, foo,
__default_alloc_template<false, 0> >::basic_string(basic_string<char,
foo,
__default_alloc_template<false, 0> > const &, unsigned long, unsigned
long)':
mutation.cpp:3: undefined reference to `basic_string<char, foo,
__default_alloc_template<false, 0> >::nilRep'
utility.o: In function `basic_string<char, foo,
__default_alloc_template<false,0> >::basic_string(basic_string<char,
foo,
__default_alloc_template<false, 0> > const &, unsigned long, unsigned
long)':
utility.cpp:2: undefined reference to `basic_string<char, foo,
__default_alloc_template<false, 0> >::nilRep'
make.exe: *** [gw4dos.exe] Error 1
This works fine in VC6.0 (not that that matters.)
Any thoughts?
I also tried replacing the STL with STLport, but that led to even worse
nightmares.
Sent via Deja.com http://www.deja.com/
Before you buy.
- Raw text -