Hello,
i install allegro 5. I use it with C and no C++. I have not met error with codeblocks and mingw.
But under VISUAL C++ 2013 I encounter the following error with excatly the same code:
1>c:\allegro-5.0.10-msvc-11.0\include\allegro5\platform\astdbool.h(26): error C2632: 'char' can not be followed by 'bool'
If i compile in C++ the problem disappears but i would like to stay in C.
This error leads me to astdbool.h(26):
#ifndef __al_included_allegro5_astdbool_h
#define __al_included_allegro5_astdbool_h
#ifndef __cplusplus
ifdef ALLEGRO_HAVE_STDBOOL_H
include <stdbool.h>
else
ifndef ALLEGRO_HAVE__BOOL
typedef unsigned char _Bool; // the erreur is with _Bool
endif
define bool _Bool
define false 0
define true 1
define __bool_true_false_are_defined 1
endif
#endif
#endif
does anyone know this problem and its solution?
Thank you very much
F
MSVC 2013 seems to support <stdbool.h>, but Allegro doesn't seem to know about this yet. You can try to configure CMake so that the ALLEGRO_HAVE_STDBOOL_H will be true.