Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » HOW TO INSTALL ALLEGRO5

This thread is locked; no one can reply to it. rss feed Print
 1   2 
HOW TO INSTALL ALLEGRO5
Trent Gamblin
Member #261
April 2000
avatar

I don't know, I haven't used 4.6.1 yet. It might work with the 4.5.x binaries but if that's what you're using I guess not. One other possibility with those errors is that you're compiling C code as C++ or vice versa.

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Depending on which addons you need, compiling A5 from source isn't as bad as it sounds. The hard part is compiling things like Vorbis / Ogg, which you need MSYS for.

A5 itself :

cd allegro
mkdir build
cd build
cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release ..
mingw32-make
mingw32-make install

MusiclyInspired
Member #13,895
January 2012
avatar

Well then, until somebody compiles new binaries the current ones listed on the website are pretty useless as there are no previous versions of MinGW available anywhere that I can find.

I'd like to have every feature available in Allegro. I'll definitely be using Vorbis among other things so I'd have to compile it with everything, which is why I gave up previously. I've used MSys before but not CMake. And the instructions for building the source were very vague or outdated. Like most information on Allegro, it seems. Unfortunate, because it's such a great library.

Thomas Fjellstrom
Member #476
June 2000
avatar

And the instructions for building the source were very vague or outdated.

Can you point to anything specific with regards to building allegro itself? If there are problems, we'd like to fix them.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730

MusiclyInspired
Member #13,895
January 2012
avatar

Just what's in the readme.txt. It's just really unhelpful. All it says is that you need to have CMake. Doesn't say how to use it or what commands to type in or anything. Unless I'm missing something.

Matthew Leverton
Supreme Loser
January 1999
avatar

Can you point to anything specific with regards to building allegro itself?

The problem is people expect the Allegro instructions to tell them how to use their operating system and tools, which is unrealistic. Instructions that say the following should be sufficient:

Here are the list of dependencies:

  • libpng (website)

  • libjpeg (website)

  • ...

Here are some cmake options:

  • -DSHARED=off/on

  • -DCMAKE_BUILD_TYPE=Release/Debug

  1. Install the dependencies that you want.


  2. Install cmake.


  3. Open a terminal at the location where you extracted Allegro's source


  4. Create a build directory, change into it, and run cmake .. (See options listed above.)


  5. Run the makefile or open up the generated project file, whichever is applicable.


  6. Use pkg-config to link on Linux/OS X. On Windows, just link to the appropriate lib/a files that you are using.


  7. See the API documentation for how to use Allegro.

If you cannot follow those instructions, then you should just read books like Surfing the Internet for Dummies, CMake for Dummies, Windows for Dummies, MSVC for Dummies, or Code::Blocks for Dummies until your knowledge is sufficient.

As I've said before, it's like buying a car and assuming the owner's manual explains how to drive.

If people want to write walkthrough tutorials on the wiki, then that is great. I have no objections. But of course it doesn't solve the actual problem of a person's incompetence since they are just copy/pasting things without learning what they are doing.

Karadoc ~~
Member #2,749
September 2002
avatar

torhu said:

I feel this version [www.microsoft.com] is still better than 2010. Maybe the 2011 or 2012 version will have caught up, but I'd go with 2008 for now. The focus of the 2010 version was porting it to .NET. In that process, some things (like performance) were lost. Yay for Microsoft dogfooding .NET

Maybe you guys have moved past this already, but I just want to say I agree with torhu that VC++2008 is better than 2010. (VC++2010 is slow.)

In my personal opinion, the ranking of current IDEs is something like this:

  1. Qt Creator

  2. VC++2008

  3. VC++2010

  4. Code::Blocks

To be honest, it's always been a puzzle to me why Code::Blocks is so popular on this forum. Last time I tried it, I thought it was painfully bad. That was probably a couple of years ago now - I expect it would have improved since then, but it would need to have improved a lot to get close to the top two on my list. And yet somehow whenever someone asks about IDEs, Code::Blocks always gets the most recommendations.

(By the way, I don't use Qt itself; I only use the IDE.)

-----------

Matthew Leverton
Supreme Loser
January 1999
avatar

In my personal opinion, the ranking of current IDEs is something like this:

MSVC 2010 plays nicer with the system DLLs (than 2008). But yeah, I've noticed that it is slower and seems to have less functionality. Probably par for the course.

I've been using Geany on Ubuntu as a code editor. So far I've got no complaints. I haven't actually tried it as an IDE yet.

AMCerasoli
Member #11,955
May 2010
avatar

Just what's in the readme.txt. It's just really unhelpful. All it says is that you need to have CMake. Doesn't say how to use it or what commands to type in or anything. Unless I'm missing something.

Take very careful what I'm going to tell you, I have used Allegro 5.0.4 with MinGW 4.6.1 with no problem, I don't know if these things could change from system to system, but I really doubt it. However, if you want to build Allegro, in the Wiki there is a tutorial explaining how to do it, it's about A5.1 but it's practically the same. I really don't recommend you to do it, you must be probably very tired/bored by now, so this could be even worse, the first thing you need to learn about this world is that you need a lot of patient. Think that the tutorial you're reading has been read by a lot of people, and just few of them have complaining about it, but none of them had a problem with MinGW 4.6.1, think that you would be the first one with this issue, so I know a lot of people have told you this, but you must be doing something wrong. I'm going to try it again on my computer later on, and tell you if I had any problem with M4.6.1 and A5.0.5

As I've said before, it's like buying a car and assuming the owner's manual explains how to drive.

Well it's true that people need to learn a little bit the tools they're going to be using, it's not only about C/C++ and Code::Blocks, you also need to know these tiny tools to compile libraries and other things. However, when you create something you want people learn how to use it, the more info you give them, the better. Telling to someone to install cmake, open it, configure and build Allegro and that's it, it is a lie.

There is a lot of trouble when building Allegro:

  • The little changes you need to do to the FLAC library.

  • Using the dynamic or static libraries of each dependency?

  • On Windows you need MYSY and not the normal console.

  • You don't need the entire distribution of directX.

  • OpenAL-soft, is not the same than OpenAL.

  • OpenAL-soft is not able to find the DirectX in the Deps folder so you need to put it inside the MinGW folder directly.

  • When building Allegro 5.1 I need to link in all my projects to "OpenAL.a" because the unique way I can compile it is dynamically with an import library.

So yhea, it's not as easy as the tiny and beauty README file says, but fortunately all the info is already on the web, if you know how to use the tools you can do it.

Quote:

If people want to write walkthrough tutorials on the wiki, then that is great. I have no objections. But of course it doesn't solve the actual problem of a person's incompetence since they are just copy/pasting things without learning what they are doing.

It's not the same when you start driving a car for first time, without to even have seen someone driving it, than if some one tells you how to do it first and then is your turn, so I think that by seeing a walkthrough could make you understand a lot of things. Sometimes you need to see it in practice to get it.

It's true, the developer doesn't need to explain how to use the tools. However some developers do it, and I consider it as a "extra" point to them.

Edit: I have tried again with MinGW 4.6.1 and Allegro 5.0.4 (I thought I had 5.0.5) and it works fine...

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Well then, until somebody compiles new binaries the current ones listed on the website are pretty useless as there are no previous versions of MinGW available anywhere that I can find.

You can download everything you need for MinGW 4.5.0 manually from Sourceforge. Go to the MinGW website and then click on downloads. See the instructions for manual installation here :
http://www.mingw.org/wiki/InstallationHOWTOforMinGW

And, since it works for AMCerasoli, there must be something else wrong.

I would try the static-md versions. They haven't been linked to the c runtime, and it may remove the errors you are getting. Also, you can try moving -lgcc_eh after the -static-libgcc and -static-libstdc++ options. gcc is pissy about the order you link in.

Trent Gamblin
Member #261
April 2000
avatar

There definitely should be older versions of mingw at http://sourceforge.net/projects/mingw. If you search for them. Last time I checked they always kept all of the old versions around.

MusiclyInspired
Member #13,895
January 2012
avatar

There are previous versions there but 4.5.2 is not among them.

Thanks for your help, everybody. I'll give it another try in the next few days. I'm not "tired/bored" with it, I was just a little frustrated with the lack of directions. And a specific version of MinGW.

 1   2 


Go to: