From: mrsteve AT nature DOT berkeley DOT edu (Steve Lane) Subject: problem with string class (not string.h vs. String.h) 2 May 1998 10:42:19 -0700 Message-ID: <354A122D.B4AABD1B.cygnus.gnu-win32@nature.berkeley.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: gnu-win32 AT cygnus DOT com I just downloaded and installed beta 19.1. No problems, everything went fine. I've been using it to work through "C++ Primer", 3/e (good book, LOTS of misprints this edition), generally without problems (i.e. templates, etc. work fine). However... This won't work, and it works fine on other compilers (i.e. g++ v. 2.8.1 running on a DEC Alpha): in file test.cc: #include int main() { string str( "string" ); return 0; } I get a whole list of errors that look like the following: mrsteve >> g++ -lg++ -I/Cygnus/b19/include/g++ -o test test.cc C:\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 `b asic_string >::~basic_string(void)' C:\TEMP\cc0010361.o(.text$_$_t12basic_string2ZcZt18string_char_traits1Zc+0x0):te st.cc: first defined here (plus about nine more multiply defined class methods, constructors, etc.) As can be seen from the command line above, this problem is not solved by linking against the g++ library, or by explicitly including the g++ include directory. I would LOVE to know what the problem is. The error messages seem to indicate that something is being multiply defined/included, but I've been through the header files some (the #include recursions get pretty hairy after a bit), and I couldn't find any obvious problems. The version info is mrsteve >> g++ -v Reading specs from C:\Cygnus\B19\H-i386-cygwin32\lib\gcc-lib\i386-cygwin32\2.7-B 19\specs gcc driver version 2.7-B19 executing gcc version 2.7-97r2aBeta and mrsteve >> uname -a CYGWIN32_NT CROAKER 4.0 19.1 i686 unknown Any help would be much appreciated -- thanks in advance! -Steve Lane - 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".