Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

cross compiling c++, halp

Name: Anonymous 2008-06-07 15:28

So yeah, I'm trying to cross-compile an sdl-app (server-client-thingy) from ubuntu to windows. I followed http://icculus.org/~dolson/sdl/, and managed to get a simple sdl-app working in wine. Also, the server compiles and links fine. Client not so.

I'm linking with something like
$ i586-mingw32msvc-g++ `/usr/path/i386-mingw32msvc-sdl-config --cflags` \
   crapload_of_object_files.o `/usr/path/i386-mingw32msvc-sdl-config --libs` \
   -lSDL_image -lSDL_ttf -lSDL_net -o client_win.exe

The mingw32 sdl-config paths should be fine. The errors:

main_client.o:client_test.cpp:(.text+0x19c): undefined reference to `Edax::Engine::run()' + similar lines, whining about custom functions, dtors and the like. Also

edax_engine.o: In function `_ZN4Edax6Engine3runEv':
edax_engine.cpp:(.text+0x172): undefined reference to `SDL_PollEvent'
edax_engine.cpp:(.text+0x184): undefined reference to `SDL_GetTicks'
edax_engine.cpp:(.text+0x1fa): undefined reference to `_ZN4Edax8Renderer4flipEv'

and

edax_engine.o:(.eh_frame+0x11): undefined reference to `__gxx_personality_v0'
edax_engine.o:(.rodata._ZTVN4Edax6EngineE[_ZTVN4Edax6EngineE]+0x10): undefined reference to `__cxa_pure_virtual'
edax_engine.o:(.rodata._ZTIN4Edax6EngineE[_ZTIN4Edax6EngineE]+0x0): undefined reference to `_ZTVN10__cxxabiv117__class_type_infoE'
collect2: ld returned 1 exit status

'__gxx_personality_v0' should be caused at least when linking c++-files with gcc, but this shouldn't be the case here.
The whole thing compiles, links and works fine as a native linux build, with g++. Halp.

Name: Anonymous 2008-06-07 15:41

[code}`/usr/path/i386[/code]

what the shit, are you using cygaids?  Don't.  Use MinGW32 and GNUWin32 instead.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List