From: Yves C. <yv...@yc...> - 2006-09-28 22:21:51
|
Hello. I succeeded building tuxmath on windows, cross compiled with mingw32 (in my edubuntu box). But it crashes on start, because of file/directory operatons. Deactivating all file operations (options reading/writing) give a running tuxmath for me. http://www.ycombe.net/tuxmath/ The zipped file is the running build. the tar.gz is the modified source (autoconfiscated and file operations deactivated). the two sh files are the scripts i use to compile. If you want to cross compile it yourself: 1) install mingw32 on linux (apt-get install mingw32 for me). 2) install precompiled dev files (lib and includes) for SDL, SDL-image and SDL-mixer in the $target directory (look into the cross-configure.sh). 3) install libgw32c (the dev file): http://gnuwin32.sourceforge.net/packages/libgw32c.htm in the same directory. 4) cross-configure.sh with --with-sdl-prefix option 5) cross-make.sh (Configure.in and Makefile.am set windows build to use ./data for data path.) -- yves |
From: David B. <db...@ta...> - 2006-09-29 11:23:11
|
Dear Yves, On Thursday 28 September 2006 18:21, Yves Combe wrote: > Hello. > > I succeeded building tuxmath on windows, cross compiled with mingw32 (in > my edubuntu box). A very timely message - I have some free time this afternoon and wanted to work on getting tuxmath working on Windows. > But it crashes on start, because of file/directory operatons. > Deactivating all file operations (options reading/writing) give a > running tuxmath for me. I was planning to try to build from the source before the config file stuff was add (revision 9 or 10), then work forward and see what causes problems for Windows. > > http://www.ycombe.net/tuxmath/ > The zipped file is the running build. the tar.gz is the modified source > (autoconfiscated and file operations deactivated). the two sh files are > the scripts i use to compile. > > If you want to cross compile it yourself: > 1) install mingw32 on linux (apt-get install mingw32 for me). And for me too! > 2) install precompiled dev files (lib and includes) for SDL, SDL-image > and SDL-mixer in the $target directory (look into the cross-configure.sh). > 3) install libgw32c (the dev file): > http://gnuwin32.sourceforge.net/packages/libgw32c.htm in the same > directory. 4) cross-configure.sh with --with-sdl-prefix option > 5) cross-make.sh > > (Configure.in and Makefile.am set windows build to use ./data for data > path.) Thanks - I am looking forward to investigating this later today! My daughter attends school in the ninth largest public school system in the US, and some of the folks at her school are quite interested in Tuxmath, but for all practical purposes it needs to run on Windows. I would love to switch the school system to Linux, but that is not a very realistic initial goal. Maybe, however, Tuxmath will be the "foot in the door" that gets the process started! -- David Bruce |
From: David B. <db...@ta...> - 2006-10-13 02:41:22
|
Hi Yves, I'm trying to cross compile tuxmath according to your advice but have not y= et=20 succeeded - get an error "undefined reference to `_WinMain@16'". > If you want to cross compile it yourself: > 1) install mingw32 on linux (apt-get install mingw32 for me). No problem. > 2) install precompiled dev files (lib and includes) for SDL, SDL-image > and SDL-mixer in the $target directory (look into the cross-configure.sh= ). I'm assuming I need the files precompiled for win32. For SDL itself, I hav= e a=20 choice of files intended for VC (SDL.dll and friends) or mingw32 (libSDL.dll.a, etc). For SDL_image and SDL_mixer, there only seem to be th= e=20 dll flavor. =20 I've tried both types of SDL libs and get the same error either way.=20 Here is a listing of my cross-tools lib directory: dbruce@debian:/usr/local/cross-tools/i586-mingw32msvc/lib$ ls SDL.dll SDL_image.lib SDLmain.lib libpng12.dll smpeg.dll =20 zlib1.dll SDL.lib SDL_mixer.dll jpeg.dll libtiff.dll vorbis.dll SDL_image.dll SDL_mixer.lib libgw32c.a ogg.dll vorbisfile.dll > 3) install libgw32c (the dev file): > http://gnuwin32.sourceforge.net/packages/libgw32c.htm in the same > directory. 4) cross-configure.sh with --with-sdl-prefix option > 5) cross-make.sh The error with ./cross-make.sh: dbruce@debian:~/tuxmath-crossbuild/tuxmath/trunk$ ./cross-make.sh make all-recursive make[1]: Entering directory `/home/dbruce/tuxmath-crossbuild/tuxmath/trunk' Making all in src make[2]: Entering directory=20 `/home/dbruce/tuxmath-crossbuild/tuxmath/trunk/src' i586-mingw32msvc-gcc -Wall -g -DDATA_PREFIX=3D\"data\" -DDEBUG -DVERSION=3D= \"tuxmath-0.96\" -DSOUND -g -O2 -I/usr/include/SDL -D_GNU_SOURCE=3D1 -D_REE= NTRANT -D__GW32__ -L/usr/local/cross-tools/i586-mingw32msvc/lib -o=20 tuxmath.exe tuxmath.o setup.o title.o game.o options.o credits.o playsound= =2Eo=20 mathcards.o=20 fileops.o -L/usr/lib -lSDL -lSDL_image -lSDL_mixer -lgw32c -luuid -lole32 = =2Dlwsock32 -mwindows /usr/lib/gcc/i586-mingw32msvc/3.4.5/../../../../i586-mingw32msvc/lib/libmin= gw32.a(main.o):=20 undefined reference to `_WinMain@16' collect2: ld returned 1 exit status make[2]: *** [tuxmath.exe] Error 1 make[2]: Leaving directory `/home/dbruce/tuxmath-crossbuild/tuxmath/trunk/s= rc' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/dbruce/tuxmath-crossbuild/tuxmath/trunk' make: *** [all] Error 2 =46rom what I can tell through google, "_WinMain@16'" refers to a function= in=20 SDLmain.lib (or libSDLmain.a) that I need to link using "-lSDLmain". Any=20 hints as to how to get this working? (I am using the current tuxmath source in svn - revision 48) Thanks for any help, =2D-=20 David Bruce |