[ANNOUNCE] mingw32 GCC 2.8.0 based toolchain available.

Liam Fitzpatrick liam@iName.com
Thu Jan 22 09:32:00 GMT 1998


>I upgraded the tools on my mingw32 page:
>
>  http://agnes.dida.physik.uni-essen.de/~janjaap/mingw32/index.html
>
>to the newly released GCC 2.8.0


I'm having problems with templates and libstdc++ :-{ One example is using
string:
e.g.
  #include <string>
  int main()
  {
    string s("Hello World!");
    return 0;
  }

Using the command "g++ teststring.cpp" gives lots of multiple definitions at
link time (shown below). The same errors result when -fno-implicit-templates
is specified.

Any ideas?

Environment variables include:
PATH=c:\mingw32\bin;C:\WINNT\SYSTEM32;C:\WINNT;C:\PROGRA~1\MICROS~1\Office;c
:\program
files\cvs;C:\gnuwin32\b18\H-i386-cygwin32\bin;C:\gnuwin32\b18\tcl\bin;C:\IBL
OCAL\BIN;C:\IDAPI;
CPLUS_INCLUDE_PATH=C:\MINGW32\include\g++;C:\MINGW32\include
C_INCLUDE_PATH=C:\MINGW32\include
GCC_EXEC_PREFIX=C:\MINGW32\lib\gcc-lib\
GDBTK_LIBRARY=C:/gnuwin32/b18/share/gdbtcl
LIBRARY_PATH=C:\MINGW32\lib
TCL_LIBRARY=C:/gnuwin32/b18/tcl/lib/tcl7.6

g++ -v displays:
Reading specs from C:\MINGW32\lib\gcc-lib\i386-mingw32\2.8.0\specs
gcc version 2.8.0

g++ teststring.cpp displays:
C:\MINGW32\lib/libstdc++.a(cstrmain.o)(.text+0x1ef8):sinst.cc: multiple
definition of `basic_string<char, string_char_traits<char>,
__default_alloc_template<false, 0> >::~basic_string(void)'
C:\TEMP\cc0001851.o(.text$_$_t12basic_string3ZcZt18string_char_traits1ZcZt24
__default_alloc_template2b0i0+0x0):teststring.cc: first defined here
C:\MINGW32\lib/libstdc++.a(cstrmain.o)(.text+0x1ff0):sinst.cc: multiple
definition of `basic_string<char, string_char_traits<char>,
__default_alloc_template<false, 0> >::basic_string(char const *)'
C:\TEMP\cc0001851.o(.text$__t12basic_string3ZcZt18string_char_traits1ZcZt24_
_default_alloc_template2b0i0PCc+0x0):teststring.cc: first defined here
C:\MINGW32\lib/libstdc++.a(cstrmain.o)(.text+0x2050):sinst.cc: multiple
definition of `basic_string<char, string_char_traits<char>,
__default_alloc_template<false, 0> >::assign(char const *)'
C:\TEMP\cc0001851.o(.text$assign__t12basic_string3ZcZt18string_char_traits1Z
cZt24__default_alloc_template2b0i0PCc+0x0):teststring.cc: first defined here
C:\MINGW32\lib/libstdc++.a(cstrmain.o)(.text+0x20c4):sinst.cc: multiple
definition of `basic_string<char, string_char_traits<char>,
__default_alloc_template<false, 0> >::assign(char const *, unsigned int)'
C:\TEMP\cc0001851.o(.text$assign__t12basic_string3ZcZt18string_char_traits1Z
cZt24__default_alloc_template2b0i0PCcUi+0x0):teststring.cc: first defined
here
C:\MINGW32\lib/libstdc++.a(cstrmain.o)(.text+0x22b4):sinst.cc: multiple
definition of
`grab__Q2t12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_temp
late2b0i03Rep'
C:\TEMP\cc0001851.o(.text$grab__Q2t12basic_string3ZcZt18string_char_traits1Z
cZt24__default_alloc_template2b0i03Rep+0x0):teststring.cc: first defined
here
C:\MINGW32\lib/libstdc++.a(cstrmain.o)(.text+0x24a4):sinst.cc: multiple
definition of
`data__Q2t12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_temp
late2b0i03Rep'
C:\TEMP\cc0001851.o(.text$data__Q2t12basic_string3ZcZt18string_char_traits1Z
cZt24__default_alloc_template2b0i03Rep+0x0):teststring.cc: first defined
here
C:\MINGW32\lib/libstdc++.a(cstrmain.o)(.text+0x24b0):sinst.cc: multiple
definition of
`release__Q2t12basic_string3ZcZt18string_char_traits1ZcZt24__default_alloc_t
emplate2b0i03Rep'
C:\TEMP\cc0001851.o(.text$release__Q2t12basic_string3ZcZt18string_char_trait
s1ZcZt24__default_alloc_template2b0i03Rep+0x0):teststring.cc: first defined
here
C:\MINGW32\lib/libstdc++.a(cstrmain.o)(.text+0x2538):sinst.cc: multiple
definition of `basic_string<char, string_char_traits<char>,
__default_alloc_template<false, 0> >::rep(void) const'
C:\TEMP\cc0001851.o(.text$rep__Ct12basic_string3ZcZt18string_char_traits1ZcZ
t24__default_alloc_template2b0i0+0x0):teststring.cc: first defined here

Thanks,
Liam
----
Liam Fitzpatrick <liam@iname.com>
Programming Research Ltd. 14 Clyde Road, Dublin 4
Tel: +353-1-6671088  Fax: +353-1-6671610  http://www.prqa.co.uk



-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".



More information about the Cygwin mailing list