astdbool.h(26): error C2632: 'char' can not be followed by 'bool'
Fred58

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

  1. ifdef ALLEGRO_HAVE_STDBOOL_H

  2. include <stdbool.h>

  3. else

  4. ifndef ALLEGRO_HAVE__BOOL

typedef unsigned char _Bool; // the erreur is with _Bool

  1. endif

  2. define bool _Bool

  3. define false 0

  4. define true 1

  5. define __bool_true_false_are_defined 1

  6. endif

#endif

#endif

does anyone know this problem and its solution?

Thank you very much
F

beoran

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.

Thread #614405. Printed from Allegro.cc