Allegro installation?

Started by
13 comments, last by Programming020195BRook 11 years, 6 months ago
Hey guys and gals,

I am new to game programming (actually any type of desktop programming, I usually do web development with LAMP/WAMP). I am trying to start learning game development using C++. I found a few good tutorial series and they all use Allegro game library. I have never used a library in this type of environment before and I am having some problems. First I was going to try to use Visual C++ 2008 but every mention I found on allegro said to download it from allegro5.org , I can not however find a place to download it from that site, nor can I find another place to download it (at least not one that my antivirus did not flag on download)

So next I installed Code Blocks 10.5 and followed the following instructions to try and install Allegro: http://wiki.allegro....le=Code::Blocks

I am having some problems with it thou. When I run these comands:

> FIX.BAT mingw
> MINGW32-MAKE.EXE
> MINGW32-MAKE.EXE DEBUGMODE=1
> MINGW32-MAKE.EXE install
> MINGW32-MAKE.EXE install DEBUGMODE=1
[/quote]

I can run >fix.bat mingw
everything else seems to fail (or maybe i don't know what success looks like? Check the attachment to see what I got when I ran these commands.

Can someone help me please? I would prefer to use MSVC 2008 sense I eventually want to make win 8 metro games using MSVS 2012 but when it comes down to it, right now I am just trying to learn, I do not care what IDE I use as long as I can get Allegro working. I am about to head off for the graveyard shift but I am off tomorrow and hopefully can make some headway with this


Thanks in advanced
~ Zero

P.S : If this is in the wrong section I apologies, it just seemed like a beginner question
Advertisement
If you don't care the IDE, getting it running in Visual Studio 2010 is easy. Same with 2012.

1. Download it: http://alleg.sourceforge.net/download.html

2. Save it to the c: drive

3. Follow these steps: http://wiki.allegro.cc/index.php?title=Windows,_Visual_Studio_2010_and_Allegro_5

4. Here's a video walkthrough/tutorial series, from installation to setup to coding your first game: http://fixbyproximity.com/2d-game-development-course/

5. Have fun
ZeroRadius: You are following a guide for installing Allegro 4, not Allegro 5. The easiest solution is to just follow the guide that Shaquil linked to. If you are still having difficulties, the best place to get help for Allegro is at Allegro.cc
Ok thanks guys. It did not work for me. I downloaded express 2010 and followed all the instructions. Re-checked everything about 8 times and it still gives me a fail when I try to build it. Can you look at the screens (attached) and make sure I did everything right? If I did I will go to the allegro.cc and try to get help there.

Thanks in advance.

Note: One set of screens shows the information I put into the Debug Config, one is the information i put in the release config, and the third set is the zip of the file i downloade (so you can see the version) and the directory that I have it in.
Can you please post the fail message?

If you created an empty project and made a main.cpp which has:


[source]#include <stdio.h>
#include <allegro.h>

int main(int argc, char **argv)
{
ALLEGRO_DISPLAY *display = NULL;

if(!al_init()) {
fprintf(stderr, "failed to initialize allegro!\n");
return -1;
}

display = al_create_display(640, 480);
if(!display) {
fprintf(stderr, "failed to create display!\n");
return -1;
}

al_clear_to_color(al_map_rgb(0,0,0));

al_flip_display();

al_rest(10.0);

al_destroy_display(display);

return 0;
}[/source]


Everything should work, but please post your error message along with the full directories for your allegro include and lib folder.
GameDev Journal: http://www.gamedev.n...-rooks-journal/

OpenChess - 1.0 done!

Classic RPG #1 - Task 9 -> January 1st 2013
Of course, Sorry that I forgot to include it to begin with.


1>------ Build started: Project: AllegroTest2010, Configuration: Debug Win32 ------
1> main.cpp
1>c:\users\zeroradius\documents\visual studio 2010\projects\allegrotest2010\allegrotest2010\main.cpp(2): error C2059: syntax error : '?'
1>c:\users\zeroradius\documents\visual studio 2010\projects\allegrotest2010\allegrotest2010\main.cpp(32): fatal error C1083: Cannot open include file: 'allegro.h': No such file or directory
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
[/quote]


Edit:

C:\allegro\lib
C:\allegro\include

(I assume that is what you meant by full directories?)
Please copy your main.cpp code.

If you're using the cpp tag option it might not show anything after #include <wont show> for some reason.... You can edit your post and just take the cpp part off, and keep it as source.
GameDev Journal: http://www.gamedev.n...-rooks-journal/

OpenChess - 1.0 done!

Classic RPG #1 - Task 9 -> January 1st 2013
Ok sorry, I'm going to re-post , that was the wrong error message from where i was trying various things earlier.
Heres the actual error message:

1>------ Build started: Project: AllegroTest2010, Configuration: Debug Win32 ------
1> main.cpp
1>c:\users\zeroradius\documents\visual studio 2010\projects\allegrotest2010\allegrotest2010\main.cpp(2): fatal error C1083: Cannot open include file: 'allegro5/allegro.h': No such file or directory
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
[/quote]

heres the source:
[source]#include <stdio.h>
#include <allegro5/allegro.h>

int main(int argc, char **argv)
{
ALLEGRO_DISPLAY *display = NULL;

if(!al_init()) {
fprintf(stderr, "failed to initialize allegro!\n");
return -1;
}

display = al_create_display(640, 480);
if(!display) {
fprintf(stderr, "failed to create display!\n");
return -1;
}

al_clear_to_color(al_map_rgb(0,0,0));

al_flip_display();

al_rest(10.0);

al_destroy_display(display);

return 0;
}[/source]

dirs:
C:\allegro\lib
C:\allegro\include
Try removing: #include <allegro5/allegro.h> and using: #include <allegro.h>
GameDev Journal: http://www.gamedev.n...-rooks-journal/

OpenChess - 1.0 done!

Classic RPG #1 - Task 9 -> January 1st 2013
same thing:


1>------ Build started: Project: AllegroTest2010, Configuration: Debug Win32 ------
1> main.cpp
1>c:\users\zeroradius\documents\visual studio 2010\projects\allegrotest2010\allegrotest2010\main.cpp(2): fatal error C1083: Cannot open include file: 'allegro.h': No such file or directory
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
[/quote]

This topic is closed to new replies.

Advertisement