From: curt AT me DOT umn DOT edu (Curtis L. Olson) Subject: #include 28 May 1998 10:28:44 -0700 Message-ID: <199805280348.WAA04212.cygnus.gnu-win32@kenai.me.umn.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit To: gnu-win32 AT cygnus DOT com 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\../../../libstdc++.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\../../../libstdc++.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\../../../libstdc++.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_traits1ZcPCc+0x0):maptest.cc: first defined here N:\Cygnus\B19\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\2.7-B19\../../../libstdc++.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_traits1ZcPCc+0x0):maptest.cc: first defined here N:\Cygnus\B19\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\2.7-B19\../../../libstdc++.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_traits1ZcPCcUi+0x0):maptest.cc: first defined here N:\Cygnus\B19\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\2.7-B19\../../../libstdc++.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_traits1ZcRCt12basic_string2ZcZt18string_char_traits1Zc+0x0):maptest.cc: first defined here N:\Cygnus\B19\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\2.7-B19\../../../libstdc++.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\../../../libstdc++.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_traits1Zc3Rep+0x0):maptest.cc: first defined here N:\Cygnus\B19\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\2.7-B19\../../../libstdc++.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_traits1Zc3Rep+0x0):maptest.cc: first defined here N:\Cygnus\B19\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\2.7-B19\../../../libstdc++.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_traits1Zc3Rep+0x0):maptest.cc: first defined here N:\Cygnus\B19\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\2.7-B19\../../../libstdc++.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_traits1Zc+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".