Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Allegro 5 + CodeBlocks + MinGW 4.8.1 = ?

Credits go to Edgar Reynaldo, LennyLen, pkrcel, and torhu for helping out!
This thread is locked; no one can reply to it. rss feed Print
Allegro 5 + CodeBlocks + MinGW 4.8.1 = ?
Paturata
Member #15,584
April 2014

Hello!

First of all, I apologize for being stupid.

About my Allegro problem - I want to start experimenting with it and decided to use the CodeBlocks IDE. So I installed the latest version of MinGW - 4.8.1 - and it works just great with CodeBlocks.

However, when I downloaded Allegro and tried to follow the CodeBlocks installation guides I managed to find, I just couldn't get it to work. All I got were missing DLLs errors.

Where could the problem be? Could anyone who - unlike me - actually know what they are doing tell me how to, step-by-step, make Allegro work with CodeBlocks and MinGW? Or is the MinGW version the problem here?

I just don't know anymore, but would love to try Allegro out.

Thanks a bunch everyone!

pkrcel
Member #14,001
February 2012

Paturata said:

However, when I downloaded Allegro and tried to follow the CodeBlocks installation guides I managed to find, I just couldn't get it to work. All I got were missing DLLs errors.

Too generic to be helpful, please give us a bit more detail about what you have done and what goes wrong.

You mean you succeed in compiling+linking but then when executing you get an error like "cannot find allegro-deug.dll" or somethinglike that?

It is unlikely that Google shares your distaste for capitalism. - Derezo
If one had the eternity of time, one would do things later. - Johan Halmén

torhu
Member #2,727
September 2002
avatar

Try putting the DLLs in the same directory as the executable.

Paturata
Member #15,584
April 2014

pkrcel said:

You mean you succeed in compiling+linking but then when executing you get an error like "cannot find allegro-deug.dll" or somethinglike that?

Yeah, I suppose.

I created a new project and in its Build options, I put all the Allegro libraries from the lib folder in the Linker settings tab, then put the path to the Allegro's include folder in the Search directories - Compiler tab.

It compiles fine but says that the program cannot start, because allegro-5.0.10-md.dll is missing.

I also tried to put the path to the bin folder in the Search directories - Compiler tab, but to no success.

LennyLen
Member #5,313
December 2004
avatar

Your problem has nothing to do with Code::Blocks. You need to do what torhu has said, and place the .dll files with your executable. If you're attempting to run your program through C::B, then you need to instead place them in your project folder.

pkrcel
Member #14,001
February 2012

Both Torhu and Lenny advece are perfectly valid althou...

...it actually HAS to do a bit with Code::Blocks if you want to have ANY project access the SAME Allegro DLL, so to be able to run you just-yet-built code with the green "run" button (as well as DEBUG)

Unfortunately I no longer use C::B, but I remember you can define a PATH (valid only trhough C::B) where you can find executables (and DLLS): This is definible at Workplace level (for globally shared objects) AND at project/target level (for RELEASE/DEBUG builds and so on...), have a look at the C::B wiki for more information...I can't skim thorugh C::B panel anymore on this PC.

It is unlikely that Google shares your distaste for capitalism. - Derezo
If one had the eternity of time, one would do things later. - Johan Halmén

Edgar Reynaldo
Member #8,592
May 2007
avatar

In CB, go to Project->Properties->Build targets tab ->Execution working directory on the bottom right.

Paturata
Member #15,584
April 2014

Thanks everyone! :D

Go to: