Stephane-D / SGDK

SGDK - A free and open development kit for the Sega Mega Drive
https://www.patreon.com/SGDK
MIT License
1.78k stars 189 forks source link

Error when compile c++ code: redeclaration of C++ built-in type ‘bool’ #255

Closed jagiella closed 2 years ago

jagiella commented 2 years ago

When I compile mixed source code in c AND c++, I get a compiler error:

In file included from /opt/gendev/sgdk/inc/genesis.h:9,
                 from smd_test.cpp:2:
/opt/gendev/sgdk/inc/types.h:81:24: error: redeclaration of C++ built-in type ‘bool’ [-fpermissive]
   81 | typedef unsigned short bool;
      |                        ^~~~
make: *** [Makefile:191: out/smd_test.o] Error 1
Stephane-D commented 2 years ago

Fixed using your PR, thanks for it :)