Subject: Re: #include <std/string.h>
From: [email-masked] (Jerry Cable)

29 May 1998 12:37:24 -0700
Message-ID: <01bd8ab8$f1282f00$67629ecf.cygnus.gnu-win32@tornado>
Mime-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
To: "Curtis L. Olson" <[email-masked]>
Cc: "gnu-win32 mailing list" <[email-masked]>

Curtis

I'm no expert on the directory structure used by the gnu compiler, but it
looks like there is a string.h file in the g++ directory. Perhaps if you
remove the std from the include line (#include <string.h>), it might work.

Jerry

-----Original Message-----
From: Curtis L. Olson <[email-masked]>
To: [email-masked] <[email-masked]>
Date: Thursday, May 28, 1998 9:14 PM
Subject: #include <std/string.h>

>I was playing around a bit with the STL and was trying to build a
>simple test of the "map" template.  The following example works great
>under Linux, but fails under cygwin32-b19.  I was rummaging around the
>mailing list archives and found a few vague references to the problem,
>but no information on what to do.  Here's my code tidbit:
>
>// a simple STL test
>
>#include <map.h>
>#include <std/string.h>
>#include <stdio.h>
>
>main() {
>    map < string, int, less<string> > mymap;
>    string name;
>    int value;
>
>    mymap["curt"] = 1;
>    mymap["doug"] = 2;
>    mymap["dan"] = 3;
>
>    printf("curt = %d\n", mymap["curt"]);
>    printf("doug = %d\n", mymap["doug"]);
>}
>
>The initial problem is that <std/string.h> doesn't exist in cygwin32,
>but if I copy over <std/string.h> from my linux system I get a cascade
>of errors that is included at the end of this message.
>
>Am I supposed to be including something else instead of
><std/string.h>?
>
>Life would really suck if I couldn't get past this problem. :-(
>
>Thanks in advance,
>
>Curt.
>--
>Curtis Olson                        University of MN, ME Dept.
>[email-masked]
>http://www.menet.umn.edu/~curt      Try Linux!
>
>Get your free flight sim:  http://www.menet.umn.edu/~curt/fgfs/
>
>
>N:\Cygnus\B19\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\2.7-B19\../../../li
bstdc++.a(cstrmain.o): In function `bool _lt<char, string_char_traits<char>
>(basic_string<char, string_char_traits<char> > const &, basic_string<char,
string_char_traits<char> > const &)':
>/home/noer/src/97r2/devo/libstdc++/std/bastring.h:515: multiple definition
of `bool operator<<char, string_char_traits<char> >(basic_string<char,
string_char_traits<char> > const &, basic_string<char,
string_char_traits<char> > const &)'
>M:\temp\59\cc0010411.o(.text$__lt__H2ZcZt18string_char_traits1Zc_RCt12basic
_string2ZX01ZX11T0_b+0x0):maptest.cc: first defined here
>N:\Cygnus\B19\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\2.7-B19\../../../li
bstdc++.a(cstrmain.o): In function
`$_t12basic_string2ZcZt18string_char_traits1Zc':
>/home/noer/src/97r2/devo/libstdc++/std/bastring.h:163: multiple definition
of `basic_string<char, string_char_traits<char> >::~basic_string(void)'
>M:\temp\59\cc0010411.o(.text$_$_t12basic_string2ZcZt18string_char_traits1Zc
+0x0):maptest.cc: first defined here
>N:\Cygnus\B19\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\2.7-B19\../../../li
bstdc++.a(cstrmain.o): In function
`_t12basic_string2ZcZt18string_char_traits1ZcPCc':
>/home/noer/src/97r2/devo/libstdc++/std/bastring.h:151: multiple definition
of `basic_string<char, string_char_traits<char> >::basic_string(char const
*)'
>M:\temp\59\cc0010411.o(.text$__t12basic_string2ZcZt18string_char_traits1ZcP
Cc+0x0):maptest.cc: first defined here
>N:\Cygnus\B19\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\2.7-B19\../../../li
bstdc++.a(cstrmain.o): In function `basic_string<char,
string_char_traits<char> >::assign(char const *)':
>/home/noer/src/97r2/devo/libstdc++/std/bastring.h:190: multiple definition
of `basic_string<char, string_char_traits<char> >::assign(char const *)'
>M:\temp\59\cc0010411.o(.text$assign__t12basic_string2ZcZt18string_char_trai
ts1ZcPCc+0x0):maptest.cc: first defined here
>N:\Cygnus\B19\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\2.7-B19\../../../li
bstdc++.a(cstrmain.o): In function `basic_string<char,
string_char_traits<char> >::assign(char const *, unsigned int)':
>/home/noer/src/97r2/devo/libstdc++/std/bastring.h:188: multiple definition
of `basic_string<char, string_char_traits<char> >::assign(char const *,
unsigned int)'
>M:\temp\59\cc0010411.o(.text$assign__t12basic_string2ZcZt18string_char_trai
ts1ZcPCcUi+0x0):maptest.cc: first defined here
>N:\Cygnus\B19\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\2.7-B19\../../../li
bstdc++.a(cstrmain.o): In function
`_t12basic_string2ZcZt18string_char_traits1ZcRCt12basic_string2ZcZt18string_
char_traits1Zc':
>/home/noer/src/97r2/devo/libstdc++/std/bastring.h:145: multiple definition
of `basic_string<char, string_char_traits<char>
>::basic_string(basic_string<char, string_char_traits<char> > const &)'
>M:\temp\59\cc0010411.o(.text$__t12basic_string2ZcZt18string_char_traits1ZcR
Ct12basic_string2ZcZt18string_char_traits1Zc+0x0):maptest.cc: first defined
here
>N:\Cygnus\B19\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\2.7-B19\../../../li
bstdc++.a(cstrmain.o): In function
`_t12basic_string2ZcZt18string_char_traits1Zc':
>/home/noer/src/97r2/devo/libstdc++/std/bastring.h:144: multiple definition
of `basic_string<char, string_char_traits<char> >::basic_string(void)'
>M:\temp\59\cc0010411.o(.text$__t12basic_string2ZcZt18string_char_traits1Zc+
0x0):maptest.cc: first defined here
>N:\Cygnus\B19\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\2.7-B19\../../../li
bstdc++.a(cstrmain.o): In function `basic_string<char,
string_char_traits<char> >::Rep::grab(void)':
>/home/noer/src/97r2/devo/libstdc++/std/bastring.h:71: multiple definition
of `basic_string<char, string_char_traits<char> >::Rep::grab(void)'
>M:\temp\59\cc0010411.o(.text$grab__Q2t12basic_string2ZcZt18string_char_trai
ts1Zc3Rep+0x0):maptest.cc: first defined here
>N:\Cygnus\B19\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\2.7-B19\../../../li
bstdc++.a(cstrmain.o): In function `basic_string<char,
string_char_traits<char> >::Rep::data(void)':
>/home/noer/src/97r2/devo/libstdc++/std/bastring.h:69: multiple definition
of `basic_string<char, string_char_traits<char> >::Rep::data(void)'
>M:\temp\59\cc0010411.o(.text$data__Q2t12basic_string2ZcZt18string_char_trai
ts1Zc3Rep+0x0):maptest.cc: first defined here
>N:\Cygnus\B19\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\2.7-B19\../../../li
bstdc++.a(cstrmain.o): In function `basic_string<char,
string_char_traits<char> >::Rep::release(void)':
>/home/noer/src/97r2/devo/libstdc++/std/bastring.h:72: multiple definition
of `basic_string<char, string_char_traits<char> >::Rep::release(void)'
>M:\temp\59\cc0010411.o(.text$release__Q2t12basic_string2ZcZt18string_char_t
raits1Zc3Rep+0x0):maptest.cc: first defined here
>N:\Cygnus\B19\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\2.7-B19\../../../li
bstdc++.a(cstrmain.o): In function `basic_string<char,
string_char_traits<char> >::rep(void) const':
>/home/noer/src/97r2/devo/libstdc++/std/bastring.h:120: multiple definition
of `basic_string<char, string_char_traits<char> >::rep(void) const'
>M:\temp\59\cc0010411.o(.text$rep__Ct12basic_string2ZcZt18string_char_traits
1Zc+0x0):maptest.cc: first defined here
>-
>For help on using this list (especially unsubscribing), send a message to
>"[email-masked]" with one line of text: "help".
>

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".