Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » setting up

Credits go to aj5555, Arthur Kalliokoski, Edgar Reynaldo, emupaul, GullRaDriel, LennyLen, Mark Oates, OICW, and Ron Novy for helping out!
This thread is locked; no one can reply to it. rss feed Print
 1   2   3 
setting up
William Labbett
Member #4,486
March 2004
avatar

Hi,

I'm trying to get allegro working with codeblocks.

I've installed CodeBlocks. Do I need to set up the paths next ?

LennyLen
Member #5,313
December 2004
avatar

Go to Settings->Compiler and Debugger->Toolchain Executable.

You'll want it looking like this (though you may have to change the installation directory):

http://www.allegro.cc/files/attachment/594188

Then when you want to compile, go to Project->Build Options->Linker settings, then add the allegro library.

edit: If you're running under Vista, you need to do a few more things. See here.

William Labbett
Member #4,486
March 2004
avatar

Here's what it looks like atm

http://www.allegro.cc/files/attachment/594189

edit :

which directory should unzip allegro to ?

My codeblocks directory is C:/CodeBlocks

LennyLen
Member #5,313
December 2004
avatar

Where do you have gcc installed? This is where the Compiler Installation Directory should be set to. At the moment, yours is pointing to your Code::Blocks directory.

If this is where you've installed gcc, it's better to keep them seperate.

edit:

Quote:

which directory should unzip allegro to

It really doesn't matter, when you compile Allegro, it will put the .h and .a files in the right place. You can make things even easier for yourself once Code::Blocks is up and running by installing the Allegro DevPak, which will do everything for you.

William Labbett
Member #4,486
March 2004
avatar

thanks,

I installed a version of CodeBlocks which comes with mingw32.

I used the command ggc -v from C:\CodeBlocks\bin and I got the version
so it must be in their somewhere.

Sounds like you think it's better to keep them seperate.

LennyLen
Member #5,313
December 2004
avatar

Quote:

Sounds like you think it's better to keep them seperate.

Mostly because I use the nightly builds, so when I install a new one, I just delete the entire Code::Blocks directory and unzip the new files.

By the way, the version that comes with gcc is an older version (it's almost two years old now). The latest nightly build is stable and has a lot more features than the 1.0RC2 version (and despite the fact that they call the RC2 release the stable release, the nightly builds are usually actually more stable).

edit: the nightly builds are here.

William Labbett
Member #4,486
March 2004
avatar

thanks,

I followed the instructions.
My codeblocks directory looks like :-

http://www.allegro.cc/files/attachment/594190

Now I'm wondering if I have to change my PATH.
Also if I have to complile allegro.

LennyLen
Member #5,313
December 2004
avatar

Quote:

Now I'm wondering if I have to change my PATH.

You don't need any entries in the path to run Code::Blocks, or even for MinGW if you are using Code::Blocks. It's still a good idea to set the MINGDIR environment variable and add your MinGW\bin directory to the path though should you ever wish to compile from the command line.

Quote:

Also if I have to complile allegro.

You can manually compile it if you want to. Otherwise, you can get the precomiled binaries and just copy the files to the correct places, or even easier, just use the DevPak (the latest version is only 4.2.1 however).

William Labbett
Member #4,486
March 2004
avatar

thanks Lenny,

not sure what to do to install the devpak though

LennyLen
Member #5,313
December 2004
avatar

Got to Plugins->Dev-C++ DevPak updater/installer. Change the update server to devpaks.org and look in the Allegro category.

William Labbett
Member #4,486
March 2004
avatar

Thanks very much for all the help.
One more thing I need to know is where liballeg.a is. That's what I need to use isn't it ?

edit : sussed it out myself but I get this as the build output :-

"colour_converter - Release" uses an invalid compiler. Skipping...
Nothing to be done.

Anyone know what's wrong ?

LennyLen
Member #5,313
December 2004
avatar

I've only ever got that error when the Compiler Installation Directory is set incorrectly.

William Labbett
Member #4,486
March 2004
avatar

I don't recall installing mingw32. I downloaded a zip file mingwm10_441.zip
which the page said I'd need if I didn't have mingw32. Am in the dark.

LennyLen
Member #5,313
December 2004
avatar

That dll is needed for the Code::Blocks IDE to run.

If you want Code::Blocks to use MinGW as the compiler (Code::Blocks can be used with many compilers), then yes, you do have to have MinGW installed on your system.

William Labbett
Member #4,486
March 2004
avatar

Hi,

Don't know if there's a simple answer to this. Here's the compiler output -

Compiling: main.c
Linking console executable: bin\Release\colour_converter.exe
Execution of 'mingw32-g++.exe  -o bin\Release\colour_converter.exe obj\Release\main.o   -s' in 'C:\codeblocks\1stproject\colour_converter' failed.
Nothing to be done.

GullRaDriel
Member #3,861
September 2003
avatar

Yeah. It's because the exe is already created and that.... there is nothing more to do !

Check that /bin/release directory, your exe should be there !

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

William Labbett
Member #4,486
March 2004
avatar

It doesn't seem to be.

GullRaDriel
Member #3,861
September 2003
avatar

Yeah, my bad. I missed the end of the line.

BTW, what is that '-s' you seem to have when linking ?

"Code is like shit - it only smells if it is not yours"
Allegro Wiki, full of examples and articles !!

William Labbett
Member #4,486
March 2004
avatar

I don't know. The makefile's made automatically i think.

Arthur Kalliokoski
Second in Command
February 2005
avatar

The '-s' means strip out debugging info from the output.

To the OP: Get a command prompt and type "set > env.txt" and post env.txt here.

They all watch too much MSNBC... they get ideas.

William Labbett
Member #4,486
March 2004
avatar

Sorry but in which directory ?

Arthur Kalliokoski
Second in Command
February 2005
avatar

It doesn't matter which directory you type SET in. It's a cmd.exe builtin.

They all watch too much MSNBC... they get ideas.

William Labbett
Member #4,486
March 2004
avatar

http://www.allegro.cc/files/attachment/594197

I typed it but I think nothing happened or if it did I can't find env.txt .

Arthur Kalliokoski
Second in Command
February 2005
avatar

"dir env.txt"?
You should have a "C:\Documents and Settings\william labbett\env.txt" you can grab with the Attachments thing.

They all watch too much MSNBC... they get ideas.

Mark Oates
Member #1,146
March 2001
avatar

Oh hey, you know what I did? Uninstall everything, install Dev-Cpp (with MinGW), then install the latest version of Code::Blocks from the nightly build dealie, and it automatically found the MinGW installed from Dev-Cpp. Downloaded OpenLayer, following the easy procedure in my Installing OpenLayer video. Lickity smack bam! everything was ready to go.

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

 1   2   3 


Go to: