[Crossfire-wiki] [Crossfire DokuWiki] page changed: user:cavesomething:crosscompiling_for_windows
no-reply_wiki at metalforge.org
no-reply_wiki at metalforge.org
Thu May 20 14:34:48 CDT 2010
A page in your DokuWiki was added or changed. Here are the details:
Date : 2010/05/20 14:34
User : cavehippo
Edit Summary: add openGL related information, organise SDL related info more sensibly
@@ -38,23 +38,34 @@
At a minimum, you will need
* libglade
* pthread - you probably want to use pthreadGC2.dll
- * SDL
- * SDL_image
* libpng1.2 (As distinct from 1.4 which the gtk bundle gave you)
* libcurl
+
+ Optional:
+ * SDL
+ * SDL_image
+ * [[http://www.xmission.com/~nate/glut.html|GLUT]]
Remember to get both the developer packs and the dll files for each of these, sometimes they are in two separate downloads.
in any case:
* dll files belong in /usr/i586-mingw32msvc/bin (and in gtk-v2/src a bit later, see below)
* .a or .lib files belong in /usr/i586-mingw32msvc/lib
* .h files belong in
- As a special case, sdl_config (from the sdl package) goes in bin.
+ === Special cases===
+
+ ==SDL==
+ If you aren't compiling with SDL support, then ignore this
+
+ sdl_config (from the sdl package) goes in bin.
Also, you will need a copy of SDL.dll in the client directory, this is because the configure script runs an SDL test program which fails if the dll isn't available.
+
+ ==Glut==
+ Glut provides glut32.lib in the zip file, you will get that renamed to libglut32.a in the tidying up section below, but cf looks for -lglut, so after the tidy-up step, copy libglut32.a to libglut.a and cf will pick it up properly (there should really be a smarter way to do this)
===== Tidying up =====
some special command line voodoo:
@@ -147,10 +158,12 @@
That's ok, we didn't pass the right configure-time options to link it properly anyway.
go to gtk-v2/src and run
<code>
- i586-mingw32msvc-gcc -mwindows -g -O2 -mms-bitfields -Wall -o crossfire-client-gtk2.exe about.o account.o config.o image.o info.o inventory.o keys.o main.o map.o magicmap.o menubar.o metaserver.o opengl.o pickup.o png.o sdl.o skills.o sound.o spells.o stats.o ../../common/libcfclient.a /usr/i586-mingw32msvc/lib/libgdk_pixbuf-2.0.dll.a /usr/i586-mingw32msvc/lib/libglade-2.0.dll.a /usr/i586-mingw32msvc/lib/libpango-1.0.dll.a /usr/i586-mingw32msvc/lib/libgtk-win32-2.0.dll.a -lpthreadGC2 -lgdk-win32-2.0 -latk-1.0 -lpangoft2-1.0 -lm -lpangocairo-1.0 -lgio-2.0 -lcairo -lfreetype -lfontconfig -llibgobject-2.0 -lgmodule-2.0 -llibglib-2.0 -lwsock32 -lwinmm -lpng12 -lz -lm -llibcurl -lgailutil -lSDL -lSDL_image -lmingw32 -lSDLmain -mwindows /usr/i586-mingw32msvc/lib/libSDL.dll.a
+ i586-mingw32msvc-gcc -mwindows -g -O2 -mms-bitfields -Wall -o crossfire-client-gtk2.exe about.o account.o config.o image.o info.o inventory.o keys.o main.o map.o magicmap.o menubar.o metaserver.o opengl.o pickup.o png.o sdl.o skills.o sound.o spells.o stats.o ../../common/libcfclient.a /usr/i586-mingw32msvc/lib/libgdk_pixbuf-2.0.dll.a /usr/i586-mingw32msvc/lib/libglade-2.0.dll.a /usr/i586-mingw32msvc/lib/libpango-1.0.dll.a /usr/i586-mingw32msvc/lib/libgtk-win32-2.0.dll.a -lpthreadGC2 -lgdk-win32-2.0 -latk-1.0 -lpangoft2-1.0 -lm -lpangocairo-1.0 -lgio-2.0 -lcairo -lfreetype -lfontconfig -llibgobject-2.0 -lgmodule-2.0 -llibglib-2.0 -lwsock32 -lwinmm -lpng12 -lz -lm -llibcurl -lgailutil -lSDL -lSDL_image -lmingw32 -lSDLmain -mwindows /usr/i586-mingw32msvc/lib/libSDL.dll.a -lopengl32 -lglu32 -lglut
</code>
+
+ (if you are not using openGL, omit the last 3 options: -lopengl32 -lglu32 -lglut)
That should give you a .exe file.
Now grab lots of dll files from /usr/i586-mingw32msvc/bin and put them in gtk-v2/src
IP-Address : 81.141.58.188
Old Revision: http://wiki.metalforge.net/doku.php/user:cavesomething:crosscompiling_for_windows?rev=1274376333
New Revision: http://wiki.metalforge.net/doku.php/user:cavesomething:crosscompiling_for_windows
--
This mail was generated by DokuWiki at
http://wiki.metalforge.net/
More information about the crossfire-wiki
mailing list