As it seems people are having trouble with this issue, that’s how I’ve
installed Dev-C++ with MinGW and MSYS. Hope someone finds it useful :
Download MinGW-1.1.tar.gz from :
Unzip it at C:\MinGW (I think WinZip can do it, btw, I used Winace. Someone
should suggest Mingw’s guys to zip it -just to be sure-)
Download MSYS-1.0.8-i686-2002.05.13-1.exe (or i586 or i386 if you have an
old CPU) from :
Install it al C:\msys\1.0
At the post-install stage say where is mingw located (c:/MinGW)
OPTIONAL: edit Msys.bat to use a decent terminal. A sample is:
start rxvt -sl 4096 -g 80x32+100+100 -fg Black -bg LightGrey -sr -fn “Lucida
Console-11” -tn msys -e /bin/sh --login -i
and execute it (so it creates your user and the /home directory).
Download nasm from http://www.libsdl.org/extras/win32/mingw32/nasm.exe and
move it to C:\MinGW\bin
Download OpenGL and DirectX headers and libraries from:
Move them to C:\MinGW
At the MSYS console type:
cd /mingw; gunzip directx-devel.tar.gz && tar -xvf directx-devel.tar;
gunzip opengl- devel.tar.gz && tar -xvf opengl-devel.tar.gz
Move it to your home directory C:\msys\1.0\home\YourNameWillBeHere
Supposing you’re using the CVS version, type at the MSYS console:
gunzip SDL-1.2.tar.gz && tar -xf SDL-1.2.tar
If everything went well last message should be 'creating ./config.status’
and, checking previous messages the DirectX headers, libraries, and nasm
should have been found.
./configure && make && make install
Just waita bit… and you’ll end with a working command-line SDL.
NOTE : I have to say SDL used to be installed under /usr/local in Un*x
environments AFAIK, but in MSYS it is under /local?? …but it works!! The
trick? /usr is the same as /, but I have no idea of the reason why.
(explanations welcome )
Let’s try our SDL:
And execute some of the tests (i.e. “./testgl” if using the terminal or
double-click on the executable “testgl.exe” if using Windows explorer)
Remember, stdout and stderr are redirected to .txt files!
Now let’s go for the GUI:
Download Dev-C++ 5 Beta 3, just the executable -it’s 1.70 Meg- (be nice and
use some mirror…) from http://www.bloodshed.net/dev/devcpp.html
Install it at C:\Dev-C++
IMPORTANT! This version has a bug: it doesn’t correctly read/write the
’devcpp.ini’ file so it is likely the File | New Project won’t find the
template files. Try to manually edit the path and restart Dev-C++.
Now go and set:
Compiler Options | Directories | Binaries to
C:\msys\1.0\bin (needed to use make, as MinGW’s make is overriden with MSYS’
Compiler Options | Directories | Libraries to
Compiler Options | Directories | C includes
Create a new project:
Choose a silly name like MySDLtests
Project | Options | Aditional command line options
Compiler: -Dmain=SDL_main -DHAVE_OPENGL
Linker: -lmingw32 -lSDLmain -lSDL -mwindows -lopengl32 -lglu32
The -DHAVE_OPENGL is needed by the testgl.c
That’s all! If you want you can now open any of the SDL test files and
compile them without the ./configure and make steps. Same for Sam’s port of
NeHe’s OpenGL tutorials.
This is useful for natively compiling latest SDL sources as well as -at
least in theory- compile third party libraries using the "./configure"
command (I’ve succesfully done it for zlib, now trying with libpng and jpeg,
but ‘make install’ doesn’t work out of the box.).
My two cents