![]() |
|
installing DevC++ MingW + Allegro |
ing
Member #3,671
July 2003
|
Hello, I've had a look around on the forum and done a search to try and find some Thanks |
BAF
Member #2,981
December 2002
![]() |
The build process hasn't changed... download Allegro 4.2, unzip it, fix mingw32, make, and make install. More information in docs/build/mingw32.txt |
Leniuch
Member #5,175
October 2004
![]() |
Assuming you want to use precompiled binaries here's what you have to do. Find "include" and "lib" directories you downloaded and copy them to the place you've installed mingw in. There are going to be directories with those names already so just say OK to any warnings, and let them copy. After that you only have to link against allegro library and you're there |
ing
Member #3,671
July 2003
|
OK, As I recalll I had to unzip Allegro to a directory on the C:drive. Now, the mingw32 directory is placed within DevC++. Does the location Where do I put the Allegro directory ?? just on the C:drive as before BAF I was wondering, probably the best way is still to compile and build. |
SonShadowCat
Member #1,548
September 2001
![]() |
This is the best guide I've seen so far: |
preposterus
Member #6,978
March 2006
|
The other day I downloaded the latest DevCPP (4.9.9.2) and Allegro with DevCPP's Webupdate module, so all of this should be automatic (?). My problem is that I can't compile exemples I find from tutorials, while my personal project in allegro works fine
|
ing
Member #3,671
July 2003
|
Preposterous, I'm presently looking into what packages to download. I think I will go My old system was really great, but I think it's a bit old. I know I had About your not being able to comppile the examples. I don't know, but I I wish I was able to find some really clear instructions on exactly what The link above is good, but I already have som instructions that are almost |
johnnyc
Member #6,984
March 2006
|
How I finally got Allegro working with Dev-C++: Most of this knowledge was gained through various web posts and installation documents, the rest was gained through trial and error . Use this information at your own risk. I will occasionally refer you to outside documents. The main reason for my many failed attempts to get Allegro working with Dev-Cpp was the lack of updated install documents (At least I couldn't find them.) explaining that DirectX files were needed, where to find them, and mostly, how to install them. That's why I'm typing this. I hope this helps some people avoid a difficult installation. The Dev-Cpp, Allegro, and DirectX files that are linked to below are all the programs you'll need to get started with the installation. These are the programs I used at the time of typing this document (3-06-06): http://bloodshed.net/dev/devcpp.html http://alleg.sourceforge.net/wip.html#stable 1. When installing Dev-Cpp don't use Dev-C++ as its filename this will cause problems for the programs we're trying to install, use Dev-Cpp instead. During the Dev-Cpp installation process you want to select the option to Remove all previous configuration files so you'll start with a clean slate as much as possible. I Installed Dev-Cpp to its default directory C:\Dev-Cpp. Don't bother to run Dev-Cpp after you install it. 2. Next we'll put the Allegro file in its proper place. If its in zipped format extract it into a folder of your choosing. Find the allegro file contained within, then copy or cut and paste it into the C:\Dev-Cpp folder. 3. Next we'll put the DirectX files in their proper place. If they're in zipped format extract them into a folder of your choosing. Find the include and lib files contained within, then copy or cut and paste them into the C:\Dev-Cpp folder. It will warn you that these files already exist in this folder. Click on yes to all. That's all there is to that. 4. Next we need to set the environment variables. I'm working with Windows XP and that's what I'll be describing. If you need information on how to set these environment variables for another OS, see the following document. http://www.allegro.cc/files/install-devcpp.html. To set the environment variables we need to get to the System Properties. The keyboard shortcut for this is the windows logo + (pause break) keys. GOTO step 6. 5. If you need an alternative method to get to the System Properties you can go through My Computer, then click on Control Panel. Now you need to have the control panel displayed using the classic view. If you see in the upper left corner Switch to Classic View click that. If you see Switch to Category View you're already in the correct display mode. Now find the System icon and click it. 6. Once you have the System properties window up click on the advanced tab then the environment variables button. Under the System Variables heading scroll down until you see a line that begins with the word Path. Double click this line and an edit window opens allowing you to edit the Path system variable. We want to add a new value to the end of this line. Start by positioning your cursor at the end of this line and enter the following: ;C:\Dev-Cpp\bin without the quotes. Don't forget the semicolon ( ; ), it tells the system that this is the start of a new variable value. Click on the OK button. Next we want to add a new system variable. Under the System variables heading click on the New button. For the Variable name enter MINGDIR. For the Variable value enter C:\Dev-Cpp, then keep clicking the OK buttons until all the windows are closed. Next reboot the computer so the changed environment settings will take effect. 7. Now we're to the critical steps of compiling and installing Allegro to work with Dev-Cpp. If everything was done correctly up to this point it shouldn't be a problem. The first step is opening a command prompt window. Click on Start, then Run. Type cmd and hit enter. The nice thing about the command prompt in Windows XP is that you can copy and paste its contents to a document making it easy to get help for a problem you may be having. All you have to do is right click on the title bar and it gives you some editing options. It's also easily customizable. By right clicking on the title bar and accessing the properties menu, it will display the customizing options. 8.At the command prompt we need to change our current working directory as follows. Type cd c:\dev-cpp\allegro without the quotes, and hit enter. This should now be the current working directory displayed in the prompt. We need to be in this directory because the files we want access to are in there. The fix.bat file is in this directory and it's the next file we'll be using. Type the following command fix mingw32 and hit enter, you should see a "Done!" message. Enter the next command make, you will see Allegro being compiled. Enter the next command make install, Allegro is now being installed. If you seen any error messages something isn't right and you'll have to review what you've done so far. Otherwise it's time to test the installation to see if we can get a simple program to run. Close the command prompt by entering the command exit. 9. Run the Dev-C++ program and configure it using its default options if you're not sure what you want. Now we'll create a project to test our Allegro installation. Click on file\ new\ project. Click windows application. Under the project options heading select c project and click OK. Save the project file in any folder and any name you want. After you do that A code editing window should come up with some default code already in it. Using the editing options select all of this code and hit the delete key to get rid of it. Now enter in the following code. #include "allegro.h" 10.Next we need to include the Allegro libraries for this code. Click project\ project options, then click the parameters tab. Now click the Add Library or Object button. In the Open window use the Look in portion to navigate your way to the C:\Dev-Cpp\lib folder and select the liballeg.a file and click OK. Next hit the F9 key to compile and run this bit of code. A save dialog window will come up. Again save the file in any folder and any name you want. If you see a message window that says Hello World! Click OK on this window to close it. You're ready to rock and roll. After everything checks out OK, I would suggest using the Dev-Cpp WebUpdate feature to update any installed components that have a newer version available. Go to tools then check for updates/packages. When the WebUpdate window opens under the select devpack server heading you'll need to select devpacks.org. Then click on the check for updates button. When the list is finished building it will show the versions of the components that you have installed and the version of any update that is available. You can select an update that you want by clicking the box next to it. This selects it for downloading. Next click on the download selected button. You will be prompted to install these files when they're done downloading. A few closing notes. I'm a noob at all of this and can't answer any technical questions or any other questions beyond what I've already described here. So if you still don't get it to work after reading this there is nothing I can do for you. Sorry! All I could say is, I know how you feel. It took me a week to get this to work. I could also say that I've seen a lot of people trying to help noobs get started on the forums, so don't give up, ask for help. |
BAF
Member #2,981
December 2002
![]() |
You don't have to reboot to apply the environmental stuff, just close all your cmd/command windows and re-open them. I'd say follow Ceniza's tutorial (or the one posted above). You may or may not need the minimalistic directx stuff from the Allegro site to get it to compile on mingw. |
ing
Member #3,671
July 2003
|
Johnny, this is a gret post. Thank You. I have now got it all to work. I had to read from several Thanks to all who have helped |
C Bird
Member #6,854
February 2006
|
I've never really had trouble with this kind of setup. |
|