Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » Using Allegro 5 with Code::Blocks 10.05

This thread is locked; no one can reply to it. rss feed Print
Using Allegro 5 with Code::Blocks 10.05
herindes
Member #13,286
August 2011

Hi all,

I'm trying to use Allegro 5 with Code::Blocks. I initially used MSVC 2010 and got a game running but for prompt reasons I want to use Code::Blocks. I followed the wiki setup tutorial step-by-step until "Now you are ready to code!!!." (although "and a small set of binaries from the DirectX Direct3D library." didn't show up later in the tutorial)

Anyway, I am having a problem. When I even try to build the first tutorial example it fails and opens up stdint.h with these errors:

Quote:

33 error: 'long long long' is too long for GCC
33 error: declaration does not declare anything
34 error: duplicate 'unsigned'
34 error: 'long long long' is too long for GCC
34 error: declaration does not declare anything

#SelectExpand
33typedef long long int64_t; 34typedef unsigned long long uint64_t;

Using Win7 x64, Allegro 5.0.3, Code::Blocks 10.05, MinGW 4.5.2

Did I leave out any other information? My file is called main.cpp :P

Best,

H

AMCerasoli
Member #11,955
May 2010
avatar

herindes said:

although "and a small set of binaries from the DirectX Direct3D library." didn't show up later in the tutorial

Well, that's because you didn't click the "installing MinGW" link, but I have been using Allegro without those binaries... So I might modify that... there is really little info about those binaries...

About the errors I have no idea, wait for the professionals. :)

Matthew Leverton
Supreme Loser
January 1999
avatar

Sounds like maybe you are using the MSVC Allegro headers with MinGW.

herindes
Member #13,286
August 2011

Well, that's because you didn't click the "installing MinGW" link, but I have been using Allegro without those binaries... So I might modify that... there is really little info about those binaries...

Aha, that's true! I did go through with the tutorial you mention but I forgot I did not copy the dx9mgw.zip files because the link to that file is broken in the tutorial at the end.

Sounds like maybe you are using the MSVC Allegro headers with MinGW.

Okay, that fixed it! I redid the setup using the MinGW 4.5.2 files instead and it worked. However, when I redid the C::B setup using the 5.0.4 release I got this error:

Quote:

C:\allegro\lib\liballegro-5.0.4-static-mt.a(wsystem.o):wsystem.c
undefined reference to `PathFindOnPathA@8'

But 5.0.3 works so I am satisfied. ;D

Thanks!

H

Matthew Leverton
Supreme Loser
January 1999
avatar

When you static link, if you get an undefined reference, just Google the function name (PathFindOnPath) and look up the library it needs. In this case it is "Shlwapi.lib".

Or, I suppose it's libshlwapi.a on MinGW.

Go to: