This article provide a way to set up an environment for compiling on Windows, willing to use Eclipse CDT as development environment. For Windows, you also need MinGW and MSYS.
Configure MSYS/MinGW for Windows
On Windows Eclipse need MinGW and MSYS to compile sources. See also the MinGW article.
- first preparations:
- use prepackaged version for MinGW/Code::blocks, extract MinGW where you want (I used E:\MinGW)
- install MSYS (E:\MSYS)
- update MSYS with compiled versions found in MSYS download section: (perhaps these are only needed if I want to run autoconf from configure.ac; in the end that led to another error not being able to run configure, so I used configure version from trunk)
- started configure, realized that SDL.h was not found because of missing path
- create missing path/link. You must have Microsoft junction:
- in MSYS command shell
- in Windows command shell
junction i386-mingw E:\MinGW
- in MSYS command shell
- restarted configure, realized that SDL libraries are not found
- change sdl-config (if you have problems with SDL lib checking)
- sdl-config is located in E:\MinGW\bin
- add "-lmingw32 -lSDLmain -lSDL -mwindows" from --libs to --cflags
- now configure and make will run, further steps are needed to get it running in eclipse:
- add MinGW and MSYS bin folders to PATH variable, I placed it at front because there is a windows version of find which uses wrong syntax to let make run under Eclipse
- to get rid of massive warnings about unused linker files: Edit Makefile in root directory, remove the -l parts from CFLAGS
For useful work with Eclipse I use Ganymede (3.4) package for C++ developers, added SVN Connector + JavaHL implementation (found on polarion To enable C features for UFO:
- add SVN repository to list
- check out as new project
- Use "New"->"Convert project to C/C++ project" to add c project nature
This way I now can compile/debug UFO directly from Eclipse, having SVN support for easy updating. I don't add this to main page because I want to hear your comments whether this is a "clean" solution. RudolfoWood 20:01, 13 August 2008 (CEST)
Make, run and debug on Windows
Make all to create binaries (hammer icon). If it dont work, be sure Eclipse know the MinGW and MSYS binary path.
- Window -> Preferences -> C/C++ -> Environment
- Add a "path" variable with MinGW and MSYS binary path
Fix binary parser if need.
- Project -> Properties -> C/C++ Build -> Settings -> Binary Parsers
- check "PE Windows Parser"
Add a "run configuration"
These steps I did to prepare radiant building. I actually can't compile it yet, so I will add more steps...
- added GTK dependencies by installing(all in one bundle, unzip to MinGW directory)
- added GtkGLExt (followed this instructions)
- download and untar 1.2.0 file from here
- removed all lines with pangox from untared Template:Path (last one GDKGLEXT_PACKAGES="gdk-2.0 pango pangox gmodule-2.0" just remove pangox from this line)
- configure (./configure --prefix=/mingw)
- remove the lines with
--fprod "/* enumerations from \"@filename@\" */\n" \and
--fprod “\n/* enumerations from \"@filename@\" */" \from Template:Path
- make && make install
- follow this instruction to install xmllib2 - just untar, configure, make and make install.
- now ufoai "configure --enable-uforadiant" works
- for radiant compile I had to change from gcc to g++ - I'll try to provide a change to makefiles after I figure out how this would be done clean. I'll add further notes later
RudolfoWood 19:16, 17 November 2008 (UTC)
Radiant makefile changes are in trunk, so nothing to be done for that. --enable-uforadiant is no longer needed. One thing I had to do to get radiant running:
RudolfoWood 14:50, 27 December 2008 (UTC)