Technical support > Linux

[RESOLVED] Crosscompiling from Linux for Windows

(1/4) > >>

MarcoBi:
Hi Devs,
I'm currently attempting to cross compile latest git version (20/09/2010) from a custom Linux toolchain (MinGW-Cross-Env) to Windows.

with a


--- Code: ---SDL_LIBS="`/opt/mingw/usr/i686-pc-mingw32/bin/sdl-config --libs` -lrtmp -lz -lws2_32 -lwinmm -lssl -lgdi32 -lcrypto -lws2_32 -lgdi32 -lcrypt32 -lz -lfreetype -lwinmm" ./configure --host='i686-pc-mingw32' --with-curl-config=/opt/mingw/usr/i686-pc-mingw32/bin/curl-config
--- End code ---

I get this error while linking:


--- Code: --- * [GAM] ... linking  ()
 * [UFO] ... linking   (-L/opt/mingw/usr/i686-pc-mingw32/lib -lvorbis -lm -logg       -lz  -L/opt/mingw/usr/i686-pc-mingw32/lib -lcurl -L/opt/mingw/usr/i686-pc-mingw32/lib -L/opt/mingw/usr/i686-pc-mingw32/lib -lidn -lwldap32 -lws2_32 -lgcrypt -liconv -L/opt/mingw/usr/i686-pc-mingw32/lib -lgpg-error -lz -lgnutls -lws2_32 -lgcrypt -liconv -L/opt/mingw/usr/i686-pc-mingw32/lib -lgpg-error -ljpeg  -L/opt/mingw/usr/i686-pc-mingw32/lib -lpng14 -lz   -L/opt/mingw/usr/i686-pc-mingw32/lib -lmingw32 -lSDLmain -lSDL -lwinmm -mwindows -liconv -lm -luser32 -lgdi32 -lwinmm -ldxguid -lrtmp -lz -lws2_32 -lwinmm -lssl -lgdi32 -lcrypto -lws2_32 -lgdi32 -lcrypt32 -lz -lfreetype -lwinmm -mwindows -L/opt/mingw/usr/i686-pc-mingw32/lib -lSDL_image -ltiff -ljpeg -lmingw32 -lSDLmain -lSDL -liconv -lm -luser32 -lgdi32 -lwinmm -ldxguid -lpng14 -lz   -mwindows -L/opt/mingw/usr/i686-pc-mingw32/lib -lSDL_mixer -lmikmod -lpthread -lsmpeg -lstdc++ -lmingw32 -lSDLmain -lSDL -liconv -luser32 -lgdi32 -lwinmm -ldxguid -lvorbisfile -lvorbis -lm -logg   -lSDL_ttf  -logg  -lxvidcore  -L/opt/mingw/usr/i686-pc-mingw32/lib -ltheora -logg   -lintl -lxvidcore  -lws2_32 -lwinmm -lgdi32 -lopengl32 -L/opt/mingw/usr/i686-pc-mingw32/lib -lmingw32 -lSDLmain -lSDL -lwinmm -mwindows -liconv -lm -luser32 -lgdi32 -lwinmm -ldxguid -lrtmp -lz -lws2_32 -lwinmm -lssl -lgdi32 -lcrypto -lws2_32 -lgdi32 -lcrypt32 -lz -lfreetype -lwinmm)
Warning: resolving _timeBeginPeriod by linking to _timeBeginPeriod@4
Use --enable-stdcall-fixup to disable these warnings
Use --disable-stdcall-fixup to disable these fixups
 * [DED] ... linking   (-lz  -L/opt/mingw/usr/i686-pc-mingw32/lib -lcurl -L/opt/mingw/usr/i686-pc-mingw32/lib -L/opt/mingw/usr/i686-pc-mingw32/lib -lidn -lwldap32 -lws2_32 -lgcrypt -liconv -L/opt/mingw/usr/i686-pc-mingw32/lib -lgpg-error -lz -lgnutls -lws2_32 -lgcrypt -liconv -L/opt/mingw/usr/i686-pc-mingw32/lib -lgpg-error -lws2_32 -lwinmm -lgdi32 -L/opt/mingw/usr/i686-pc-mingw32/lib -lmingw32 -lSDLmain -lSDL -lwinmm -mwindows -liconv -lm -luser32 -lgdi32 -lwinmm -ldxguid -lrtmp -lz -lws2_32 -lwinmm -lssl -lgdi32 -lcrypto -lws2_32 -lgdi32 -lcrypt32 -lz -lfreetype -lwinmm)
debug-mingw32-i386/server/ports/windows/win_main.o: In function `Sys_Init':
/opt/src/ufoai/src/ports/windows/win_main.c:48: undefined reference to `_timeBeginPeriod'
collect2: ld returned 1 exit status
make: *** [ufoded] Errore 1
--- End code ---

Ehm... to tell the truth I have _timeBeginPeriod@4 defined in winmm.a, anyway do I need to put -lwinmm in a particular place?

Thanks!

Mattn:
well - i don't know about that linking problem - maybe add the -lwinmm stuff to build/plattform_specific.mk

it would be very nice if you could test the patch for the new build system with mingw-cross-env. the patch is at http://mattn.ninex.info/files/newbuildsystem.diff

MarcoBi:

--- Quote from: Mattn on September 20, 2010, 06:49:05 pm ---well - i don't know about that linking problem - maybe add the -lwinmm stuff to build/plattform_specific.mk

it would be very nice if you could test the patch for the new build system with mingw-cross-env. the patch is at http://mattn.ninex.info/files/newbuildsystem.diff

--- End quote ---

Do I need to apply it to latest git? I'm asking because of lot of "rejected" errors... { Reversed (or previously applied) patch detected!  Assume -R? [n] } 

bayo:
I dont check to patch, but it is not yet applied to the repository.

Mattn:
yes, you have to apply it - but try to use git apply patch.diff

Navigation

[0] Message Index

[#] Next page

Go to full version