mihaim Report post Posted February 20, 2005 Did anyone tryed to do a cross compile ? If yes can anyone post a mini howto .... if not can someone look into it ? It will be really nice to have clients cvs build up to date .... So anyone wants to dig up in this ? Share this post Link to post Share on other sites
Entropy Report post Posted February 21, 2005 For win32 you mean? Share this post Link to post Share on other sites
mihaim Report post Posted February 21, 2005 Yep . Building win32 client from linux. Lots of advantages if we can do this . Share this post Link to post Share on other sites
The_Piper Report post Posted February 21, 2005 http://sources.redhat.com/ml/crossgcc/2002-01/msg00069.html A first shot in the dark, will try it later. Piper Share this post Link to post Share on other sites
Grum Report post Posted February 21, 2005 I have built a windows version of a bot once, using the mingW compiler on linux. I used the instructions on http://www.libsdl.org/extras/win32/cross/README.txt to install the cross-compiler. Share this post Link to post Share on other sites
crusadingknight Report post Posted February 21, 2005 I have built a windows version of a bot once, using the mingW compiler on linux. I used the instructions on http://www.libsdl.org/extras/win32/cross/README.txt to install the cross-compiler. I tried that, but didn't have the patience with the client... Share this post Link to post Share on other sites
The_Piper Report post Posted February 21, 2005 I have built a windows version of a bot once, using the mingW compiler on linux. I used the instructions on http://www.libsdl.org/extras/win32/cross/README.txt to install the cross-compiler. Error 404: Not Found when executing the first shellscript So ill try to follow the instructions i posted now. Piper Share this post Link to post Share on other sites
The_Piper Report post Posted February 21, 2005 Ok, another link: http://members.lycos.co.uk/alexv6/Cross_mi...sing_HOWTO.html This one gave me already a HELLO.EXE which works both under Linux and Windows Its easy to use, just read, download, extract into the named directories, execute once a script named cross by typing ". cross" once you logged on and compile using gcc. For make there is a cross-make and a cross-configure is available too. Piper Share this post Link to post Share on other sites
Entropy Report post Posted February 21, 2005 Or use Wine Share this post Link to post Share on other sites
Malaclypse Report post Posted February 25, 2005 I managed to compile a windows binary using a mingw cross compiler Unfortunately I can not test it yet Anyone, I can send the binary to for testing? Share this post Link to post Share on other sites
The_Piper Report post Posted February 25, 2005 Yes, me. I sent you my email addy as a forum mail. Im actually trying too to compile something more than a hello.exe. Let see how far we can go :lol: Piper Share this post Link to post Share on other sites
The_Piper Report post Posted February 25, 2005 Unbelievable, it works Of course, i must compile with -DNO_MUSIC, but this seems to be my personal curse... So, to cross compile, do this: http://members.lycos.co.uk/alexv6/Cross_mi...sing_HOWTO.html Follow the instructions in this link, download and install the software in the recommended directories and create that link /target. Then follow the instructions in the "how to compile with dev-cpp" pinned post in the Programming forum. Meaning, install all the include and lib files to the /target/include and /target/lib directories as described in that post. And copy the OpenAl files too into the include and lib dirs. Unfortunately you need windows to execute the setup.exe for openal... Then save this makefile as Makefile.cross. You must replace [tab] with real tabulators. Its based on a Makefile a player Ohmu posted some month ago in forums. # Project: elc # Makefile created by Ohmu DEV-CPP = D:\Dev-Cpp OAL = C:\Programme\OpenAL 1.0 Software Development Kit # Headers DEV-MAIN = $(DEV-CPP)\include OPENAL = $(OAL)\Include LIBXML = $(DEV-MAIN)\libxml ICONV = $(DEV-MAIN) SDL = $(DEV-MAIN)\SDL OGG = $(DEV-MAIN)\ogg VORBIS = $(DEV-MAIN)\vorbis #Libs L_DEV-MAIN = $(DEV-CPP)\lib L_OPENAL = $(OAL)\libs # Prograns ###CPP = $(DEV-CPP)\bin\g++.exe ###CC = $(DEV-CPP)\bin\gcc.exe WINDRES = $(DEV-CPP)\bin\windres.exe OUTPUT = elc_cross.exe ELC-RES = elc_private.res OBJECTS = 2d_objects.o 3d_objects.o actor_scripts.o actors.o asc.o buddy.o \ cache.o colors.o console.o cursors.o dialogues.o draw_scene.o errors.o \ encyclopedia.o events.o elconfig.o elwindows.o filter.o font.o frustum.o gl_init.o \ ignore.o init.o interface.o items.o keys.o knowledge.o lights.o hud.o main.o \ manufacture.o map_io.o md2loader.o md5.o misc.o multiplayer.o new_actors.o \ new_character.o options.o particles.o paste.o pathfinder.o questlog.o reflection.o rules.o \ shadows.o sound.o spells.o stats.o text.o textures.o tile_map.o trade.o translate.o\ weather.o widgets.o pm_log.o timers.o $(ELC-RES) LIBS = -L"$(L_OPENAL)" -mwindows -lopengl32 -lSDL -lSDL_net -lALut -lOpenAL32 -llibxml2 -lvorbis -logg -liconv -liberty CXXFLAGS = -I"$(DEV-MAIN)" -I"$(ICONV)" -I"$(LIBXML)" -I"$(SDL)" -I"$(OPENAL)" -I"$(OGG)" -I"$(VORBIS)" -DNO_MUSIC -DWINDOWS -march=i686 -fomit-frame-pointer -ffast-math -pipe -fexpensive-optimizations -O -DELC CFLAGS = $(CXXFLAGS) all: $(OBJECTS) [tab]$(CC) -o "$(OUTPUT)" $(OBJECTS) $(LIBS) $(ELC-RES): [tab]$(WINDRES) -i elc_private.rc -I rc -o $(ELC-RES) -O coff clean: [tab]rm -f $(OBJECTS) $(OUTPUT) Then simply go to your ELC directory and type "cross-make -f Makefile.cross" and thats it. The result is named elc_cross.exe. Piper Share this post Link to post Share on other sites
The_Piper Report post Posted March 3, 2005 (edited) And another makefile which cross-compiles a client with music. I added 2 more vorbis libs to solve that problem. If you take the latest source from CVS and cross-make -f you get errors about some arc() functions. It seems that the math.h file from mingcc is wrecked, so simply remove #include <math.h> from those files where the errors with arc() occur. Then it compiles fine both on Linux and Windows. Erm, and you must replace [tab] in the makefile with real tabulators, of course. Piper # Project: elc # Makefile created by Ohmu DEV-CPP = /target OAL = /target # Headers DEV-MAIN = $(DEV-CPP)/include OPENAL = $(OAL)/include LIBXML = $(DEV-MAIN)/libxml ICONV = $(DEV-MAIN) SDL = $(DEV-MAIN)/SDL OGG = $(DEV-MAIN)/ogg VORBIS = $(DEV-MAIN)/vorbis #Libs L_DEV-MAIN = $(DEV-CPP)/lib L_OPENAL = $(OAL)/lib # Prograns ###CPP = $(DEV-CPP)\bin\g++.exe ###CC = $(DEV-CPP)\bin\gcc.exe WINDRES = $(DEV-CPP)\bin\windres.exe OUTPUT = elc_cross.exe ELC-RES = elc_private.res OBJECTS = 2d_objects.o 3d_objects.o actor_scripts.o actors.o asc.o buddy.o \ cache.o colors.o console.o cursors.o dialogues.o draw_scene.o errors.o \ encyclopedia.o events.o elconfig.o elwindows.o filter.o font.o frustum.o gl_init.o \ ignore.o init.o interface.o items.o keys.o knowledge.o lights.o hud.o main.o \ manufacture.o map_io.o md2loader.o md5.o misc.o multiplayer.o new_actors.o \ new_character.o options.o particles.o paste.o pathfinder.o questlog.o reflection.o rules.o \ shadows.o sound.o spells.o stats.o text.o textures.o tile_map.o trade.o translate.o\ weather.o widgets.o pm_log.o timers.o $(ELC-RES) LIBS = -L"$(L_OPENAL)" -mwindows -lopengl32 -lSDL -lSDL_net -lALut -lOpenAL32 -llibxml2 -lvorbis -lvorbisfile -lvorbis_d -logg -liconv -liberty CXXFLAGS = -I"$(DEV-MAIN)" -I"$(ICONV)" -I"$(LIBXML)" -I"$(SDL)" -I"$(OPENAL)" -I"$(OGG)" -I"$(VORBIS)" -DWINDOWS -march=i686 -fomit-frame-pointer -ffast-math -pipe -fexpensive-optimizations -O -DELC CFLAGS = $(CXXFLAGS) all: $(OBJECTS) [tab]$(CC) -o "$(OUTPUT)" $(OBJECTS) $(LIBS) $(ELC-RES): [tab]$(WINDRES) -i elc_private.rc -I rc -o $(ELC-RES) -O coff clean: [tab]rm -f $(OBJECTS) $(OUTPUT) Edited March 4, 2005 by The_Piper Share this post Link to post Share on other sites