|
|
| Installing 4.9.3 on Windows using MinGW |
|
wiseguy
Member #44
April 2000
|
I had a lot of trouble getting 4.9.3 to compile, so I thought I would post this to let everyone else who wants to try it know how I got things to work. First, I had to download the technology preview version of MinGW to get gcc 4, because I still haven't been able to successfully build all of the shared library under windows. Here are the files I got, but you may not need them all: gcc-core-4.2.1-sjlj-2.tar.gz gcc-g++-4.2.1-sjlj-2.tar.gz libgcc_sjlj_1.dll.gz binutils-2.18.50-20080109-2.tar.gz mingw32-make-3.81-20080326-2.tar.gz gdb-6.8-mingw-3.tar.bz2 w32api-3.11.tar.gz mingw-runtime-3.14.tar.gz mingw-utils-0.3.tar.gz If you download the MinGW 5.1.4 installer that will only install gcc 3.4.5, so you will need to manually download these and extract them into a MinGW directory. Don't forget to change your MINGDIR variable and the path to MinGW/bin. You then have to go into the MinGW/bin directory and remove the -sjlj from all of the exe files. Next you'll need CMake. You can get version 2.4 from You'll also need the DirectX 9 header files and libraries, which can be found Extract the allegro-4.9.3 sources to a directory and open up a command prompt window. Make sure gcc works by typing gcc -v. You should see this: Quote:
D:\PROGRA~1\allegro5\allegro>gcc -v It's a good idea to make a build directory. Go to your allegro directory, and type this: md build cd build cmake .. -G "MinGW Makefiles" -DSHARED=off once cmake finishes, type mingw32-make and wait... If everything went right, when it's done compiling just type mingw32-make install Now you've got a working Allegro 4.9.3 installation. To use it, you need to and link with these libraries: -lalleg_s-4.9.3 -lkernel32 -luser32 -lgdi32 -lcomdlg32 -lole32 -ldinput -lddraw -ldxguid -lwinmm -ldsound -ld3d9 -lopengl32 Hopefully that all works. If you used the build directory, you'll have to run the examples from inside the directory where the .c files are, or they won't find the datafiles and other things they need to run. For example: cd \allegro5\allegro\examples ..\build\examples\exnewapi.exe Alternatively, you can simply copy all of the datafiles and other things into your build/examples directory Hope this helps. WG |
|
Milan Mimica
Member #3,877
September 2003
|
Quote: You then have to go into the MinGW/bin directory and remove the -sjlj from all of the exe files. No need to rename them all, just gcc.exe and g++.exe. In fact, in my experience renaming them all results in broken MinGW installation.
-- |
|
wiseguy
Member #44
April 2000
|
hmmm maybe that's what is causing me problems... |
|
Neil Walker
Member #210
April 2000
|
I don't mean to sound rude, and I know 4.9.3 is in beta, but it seems quite ridiculous that in order to compile allegro you have to dump your stable version of gcc and use an unstable 'future' version. Surely there's no code in allegro that your average c compiler can't compile? Neil. wii:0356-1384-6687-2022, kart:3308-4806-6002. XBOX:chucklepie |
|
Goalie Ca
Member #2,579
July 2002
|
Well I'm sure it works with gcc 3 (gcc4 is a few years old now and is much more strict and standards compliant). As far as I know, the main problem with mingw based on gcc3 is its relatively poor ability to handle dll's. ------------- |
|
wiseguy
Member #44
April 2000
|
My earlier post was a bit of an overkill, as a couple couple of the guys really helped me out with getting things working. The only thing I can say is to give it a try with the stable releases, but just keep in mind with those you can only build the shared library... I just got the sound stuff working today and the whole thing is pretty darn cool. I'm really looking forward to a non WIP version Thanks to everyone who helped me get it to compile for me. WG |
|
aj5555
Member #9,033
September 2007
|
Well done! |
|
Milan Mimica
Member #3,877
September 2003
|
Quote: Surely there's no code in allegro that your average c compiler can't compile?
Readme says: Note: For MinGW with gcc < 4, you cannot build a static library because TLS (thread local storage, using __thread) support was not introduced until version 4. And gcc4 is not a "future" release.
-- |
|
UCL057
Member #9,720
April 2008
|
About building allegro5 Now I got this error: allegro/src/win/d3d_disp.c error: 'D3D9b_SDK_VERSION' undeclared |
|
Milan Mimica
Member #3,877
September 2003
|
Your d3d9.h is wrong.
-- |
|
aj5555
Member #9,033
September 2007
|
using the latest DirectX SDK is not likely to work. there have been several posts around this forum about which directX SDK to use. |
|
Edgar Reynaldo
Major Reynaldo
May 2007
|
Read the first post in this thread again to see the link to the correct DX9 headers. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
|
UCL057
Member #9,720
April 2008
|
I have the right DX9 |
|
Goalie Ca
Member #2,579
July 2002
|
dsound.h? That must be from the old audio. You can safely disable that in the cmake all the sound options like digi off. The new audio engine (still a wip) is an addon and appears as "WANT_AUDIO" in the configure and it require OpenAL to be installed (no directsound backend yet). ------------- |
|
UCL057
Member #9,720
April 2008
|
About dsound.h Is it CmakeCachelist or??? I have found some undeclared functions in allegro5, |
|
|