Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Compiler and Allegro

This thread is locked; no one can reply to it. rss feed Print
Compiler and Allegro
Blick Fang
Member #16,565
September 2016

Hi All

I am a noob finding my programming legs (??). In my pursuit of a language that suits me, I found myself kinda partial to C++. With that said, I am kind of partial to DEV C++. However, I am not finding a clear install method of uniting Allegro and DEV C++. I guess I could abandon DEV C++ but have almost bonded with it ;D. I would very much like to experiment with Allegro. Can someone recommend a good solution?

Thanks

???

DanielH
Member #934
January 2001
avatar

If you don't mind Microsoft, you could try the Community version of MSVC. With the NuGet package manager, adding Allegro to a project is easy.

bamccaig
Member #7,536
July 2006
avatar

I believe it should be possible to use Dev C++ with Allegro. You may struggle a little bit with configuring it, but if you aim to use Dev C++ then it's a good idea to learn how to configure it. And if you aim to develop in C or C++ then you should certainly learn what is needed to interface with libraries.

Typically for C or C++ projects you have to do a couple of things: inform your compiler where to find header files (your own and third party libraries), inform your compiler where to find library files (.lib and .dll in Windows, .a and .so in *nix), and finally which library files to link into your program(s).

First of all you will need to install a compatible version of Allegro. Install here just means "copy a binary distribution to your hard drive". It's important that binaries (.lib or .dll's) are compatible with your toolchain (compiler and linker versions). For Windows, typically your toolchain is either MSVC if you're using Visual Studio, or a MinGW/MSYS port of GNU GCC.

Make sure to download a compatible MinGW/GCC build of Allegro. Then just configure Dev C++ to know where to find the Allegro header files (the include directory of the Allegro installation) and the Allegro library files (the bin or lib directories of the Allegro installation). Then add the specific Allegro libraries to your project. I believe the easy button is now a "monolith" DLL that contains all of the addons so you only need to configure one library.

The wiki should also offer some assistance with this (and if it's not enough to get you going you might motivate somebody here to improve upon it).

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

I don't know the state of DevCPP these days, but a good alternative is CodeBlocks for an IDE. No Microsoft bloat or complexity, simple menus, good integration with MinGW.

If you choose DevCPP or Codeblocks, you can use my MinGW distribution and my Allegro 5.2.1.1 binaries, which you can find here :

https://www.allegro.cc/forums/thread/616446

Specter Phoenix
Member #1,425
July 2001
avatar

Depends on which Dev-C++ variant he is using. Bloodshed's Dev-C++ has been dead since like 2005, wxDev-C++ is dead since 2011, but I'm not sure about Orwell's Dev-C++ as it was updated April of 2015.

http://orwelldevcpp.blogspot.com/

I prefer Code::Blocks personally and seldom touch MSVC even though I have 2013 and 2015.

Blick Fang
Member #16,565
September 2016

Hi

Thanks for your input.

I am going to give Code Blocks a try.

:D

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Lots of CB users here. We can help you get set up.

Main thing is to go to Project->Build Options and select your global project build on the top left. Then go to the Search Directories tab and under compiler add your 'include' directory and under linker tab add your 'lib' directory.

Then under the Linker Settings tab add the libraries you want to link to.

It's that simple.

Not some convoluted property list that you have to click on 5 times to edit like in cough*MSVC*cough.

Niunio
Member #1,975
March 2002
avatar

I am a noob finding my programming legs (??). In my pursuit of a language that suits me, I found myself kinda partial to C++. (...)

Did you try Lazarus+Free Pascal? The Allegro.pas 5 is still WIP but almost stable. ::)

-----------------
Current projects: Allegro.pas | MinGRo

Go to: