From: jcable AT cyberramp DOT net (Jerry Cable) Subject: Re: #include 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" Cc: "gnu-win32 mailing list" 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 ), it might work. Jerry -----Original Message----- From: Curtis L. Olson To: gnu-win32 AT cygnus DOT com Date: Thursday, May 28, 1998 9:14 PM Subject: #include >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 >#include >#include > >main() { > map < string, int, less > 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 doesn't exist in cygwin32, >but if I copy over 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 >? > >Life would really suck if I couldn't get past this problem. :-( > >Thanks in advance, > >Curt. >-- >Curtis Olson University of MN, ME Dept. >curt AT me DOT umn DOT edu >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 >(basic_string > const &, basic_string > const &)': >/home/noer/src/97r2/devo/libstdc++/std/bastring.h:515: multiple definition of `bool operator< >(basic_string > const &, basic_string > 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 >::~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 >::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 >::assign(char const *)': >/home/noer/src/97r2/devo/libstdc++/std/bastring.h:190: multiple definition of `basic_string >::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 >::assign(char const *, unsigned int)': >/home/noer/src/97r2/devo/libstdc++/std/bastring.h:188: multiple definition of `basic_string >::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 >::basic_string(basic_string > 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 >::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 >::Rep::grab(void)': >/home/noer/src/97r2/devo/libstdc++/std/bastring.h:71: multiple definition of `basic_string >::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 >::Rep::data(void)': >/home/noer/src/97r2/devo/libstdc++/std/bastring.h:69: multiple definition of `basic_string >::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 >::Rep::release(void)': >/home/noer/src/97r2/devo/libstdc++/std/bastring.h:72: multiple definition of `basic_string >::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 >::rep(void) const': >/home/noer/src/97r2/devo/libstdc++/std/bastring.h:120: multiple definition of `basic_string >::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 >"gnu-win32-request AT cygnus DOT com" with one line of text: "help". > - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".