Installing for MinGw 4.6.2 using binary package
gentix

1) Installed MinGW using mingw-get-inst-20120421.exe, including MSYS from here http://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/mingw-get-inst-20120421/

2) In the mysys terminal "gcc -v" indicates gcc version 4.6.2, so I downloaded the appropriate binary from here http://www.allegro.cc/files/

3) Unzipped the binary and copied the three folders to C:\MinGW

4) CD'd to my working directory in the mysys terminal and performed "gcc -o test.exe foo.c -lalleg"

returns: allegro.h:no such file or directory

5) OK that's wierd. I look in the MinGW\include folder and sure enoguh, no allegro.h! I guess allegro.h is in include\allegro5 and my compiler isn't looking there.... do I need to copy the contense of allegro5 to include? Shouldn't the installation of these binaries be as simple as copying the files to my MinGW folder?

Unfortunately, the page I keep coming back to, this one: http://www.allegro.cc/manual/5/install/windows.html is famously unhelpful for a newbie like me.

Thanks for Help!

Arthur Kalliokoski

Usually it's included like this:

#include <allegro5/allegro.h>

and same for the other A5 includes.

AMCerasoli

And what about the wiki?

gentix

>>Usually it's included like this:
>>#include <allegro5/allegro.h>

Ah! Thank you. I'm coming over from gcc in linux, so I did not know that.

Looks like it's linking with -lalleg now,b ut unfortunately I am now getting unexpected compiler errors... looks like it is not recognising any of the constants GFX_AUTODETECT undeclared as well as all of the KEY's and END_OF_MAIN.

Am I still missing something?

>And what about the wiki?

I have read that article, but I am not using codeblocks, just the mysys shell, so I don't think I can do the static linking thing. Is there an equivallent step for mysys that I am missing? Maybe I should just give up and use code blocks ???

EDIT: here's what my output looks like now http://i.imgur.com/H3gEg.png

Arthur Kalliokoski
gentix said:

looks like it is not recognising any of the constants GFX_AUTODETECT undeclared as well as all of the KEY's and END_OF_MAIN.

Those are for Allegro 4.x, you need to get/use the examples found here or find the A5 tutorials on the wiki.

gentix

>>Those are for Allegro 4.x, you need to get/use the examples found here[static.allegro.cc] or find the A5 tutorials on the wiki.

Ahh well there's one problem solved ::)

I think I'm still linking wrong though because I tried to compile one of the examples and it says cannot find -lalleg... I searched through allegro's lib file and sure enough I didn't see anything by the name of liballeg.a either... tried linking to a couple of the other ones, but none of them seemed to do it. What is the corret dynamic link file?

Arthur Kalliokoski

I hope this is up to date enough to help.

http://www.allegro.cc/manual/5/install/windows.html

nicse4

The MinGW .a files are, and correct me if i am wrong, the following filenames:

liballegro-5.0.x-monolith-md.a
liballegro-5.0.x-monolith-md-debug.a
liballegro-5.0.x-monolith-mt.a
liballegro-5.0.x-monolith-mt-debug.a

only pick one set of two though, ether mt or md. mt include the dll in the build, md does not, and replace x with whatever version you have(if it is the most recent, it would be 5.0.6).

Again, correct me if i am wrong.

gentix

>>I hope this is up to date enough to help.

You know what? The first time I looked at that I thought it was really unhelpful. I even said so in my original post. But I think I have learned enough between now and then to understand what it's talking about.

Nicse4 I believe you are correct. It appears to build with that. Unfortunately the symantec on this computer is blocking the exe's I compiled from the example folder ::) ... but I think that works. Thank you!

Thread #610119. Printed from Allegro.cc