Allegro.cc - Online Community

Allegro.cc Forums » Installation, Setup & Configuration » missing file in code::blocks build

This thread is locked; no one can reply to it. rss feed Print
missing file in code::blocks build
Bob Keane
Member #7,342
June 2006

This is probably something simple. I installed and set up Allegro 5, following the wiki guide, on Code::Blocks 10.5 and tried a simple program to test.

#include <iostream>
#include <stdlib.h>
#include "allegro5/allegro.h"
int main()
{
al_init();
std::cout << "Allegro version " << al_get_allegro_version << std::endl;
//textout_ex("Press any key...\n");
//getch();
return 0;
}

When building, I get the following errors:

errors said:

..\..\allegro-5.0.2-1\allegro\include\allegro5\internal\alconfig.h|28|error: allegro5/platform/alplatf.h: No such file or directory|
..\..\allegro-5.0.2-1\allegro\include\allegro5\internal\alconfig.h|57|error: #error platform not supported|
..\..\allegro-5.0.2-1\allegro\include\allegro5\platform\astdint.h|70|error: #error I dunno how to get the definitions of fixed-width integer types on your platform. Please report this to your friendly Allegro developer.|
..\..\allegro-5.0.2-1\allegro\include\allegro5\internal\alconfig.h|318|error: #error endianess not defined|
..\..\allegro-5.0.2-1\allegro\include\allegro5\fshook.h|26|error: conflicting declaration 'typedef unsigned int off_t'|
c:\program files\codeblocks\mingw\bin\..\lib\gcc\mingw32\4.4.1\..\..\..\..\include\sys\types.h|41|error: 'off_t' has a previous declaration as 'typedef _off_t off_t'|
..\..\allegro-5.0.2-1\allegro\include\allegro5\inline\fmaths.inl||In function 'int al_fixtoi(al_fixed)':|
..\..\allegro-5.0.2-1\allegro\include\allegro5\inline\fmaths.inl|207|error: 'al_fixfloor' was not declared in this scope|
C:\Documents and Settings\BobKeane\My Documents\WIP\first\main.cpp||In function 'int main()':|
C:\Documents and Settings\BobKeane\My Documents\WIP\first\main.cpp|7|warning: the address of 'uint32_t al_get_allegro_version()' will always evaluate as 'true'|
||=== Build finished: 7 errors, 1 warnings ===|

I took a cusory look at the allegro5\platform folder, there is no alplatf.h file, but an alplatfh.cmake file. Did I miss a step in the instructions?

By reading this sig, I, the reader, agree to render my soul to Bob Keane. I, the reader, understand this is a legally binding contract and freely render my soul.
If we get apple juice from squeezing apples, and we get prunes from drying out plums, where does prune juice come from?
Hi Randall Monroe.

Go to: