STL and Xmingw32?

I’m starting an SDL project and cross compiling for Win32 using Xming32.
Compiling for Linux works fine. However, it seems that STL does not work
when compiling for Win32. Even the simple test program below does not work.
Any ideas?

#include

using namespace std;

int main(int argc, char *argv[])
{
string s;

return 0;
}

Errors follow:

c++ -DPACKAGE=“openta” -DVERSION=“1.0.0” -DHAVE_LIBZ=1 -I. -I. -g
-O2
-c main.cpp
c++ -g -O2 -o openta
main.o -lz -L/usr/local/cross-tools/i386-mingw32msvc/l
ib -lmingw32 -lSDLmain -lSDL -mwindows
main.o: In function _tf11_ios_fields': /usr/local/cross-tools/lib/gcc-lib/i386-mingw32msvc/2.95.2/../../../../inclu de/g ++-3/std/bastring.h:75: undefined reference tocerr’
/usr/local/cross-tools/lib/gcc-lib/i386-mingw32msvc/2.95.2/…/…/…/…/inclu
de/g
+±3/std/bastring.h:75: undefined reference to ostream::operator<<(char const * )' /usr/local/cross-tools/lib/gcc-lib/i386-mingw32msvc/2.95.2/../../../../inclu de/g ++-3/std/bastring.h:75: undefined reference toendl(ostream &)’

Thanks,–
David Phillips <@David_Phillips>
http://david.acz.org/

try adding -lstdc++
:wink:

AlexOn Friday 02 February 2001 20:59, you wrote:

I’m starting an SDL project and cross compiling for Win32 using Xming32.
Compiling for Linux works fine. However, it seems that STL does not work
when compiling for Win32. Even the simple test program below does not
work. Any ideas?