I'm trying to run the ex_mouse_events.c example. Previously I had no trouble running the ex_keyboard_events.c example. I only have a few days experience with Allegro so please inform me with the information I need to provide to get further help.
As it stands, here is the debug output:
The example file is here: Github - ex_mouse_events.c
I have common.c included in the source code and in the project solution. Any thoughts? Thanks!
It doesn't know what a "bool" is, that's why it fails. 'bool' is C99 or C++. Change the standard you're using to compile the code. I don't use MSVS so you'll have to figure it out on your own.
Yeah, there are no problems compiling this with a GNU compiler like MinGW (comes with Code::Blocks). I compiled everything up using Code::Blocks. In CMake I configured it to create Code::Blocks makefiles with MinGW, then you simply load it into the IDE and compile. Too easy.
I also added in an option to compile my own version with the -std=gnu11 switch so the C coded compiled with the C11 standard, you could try -std=c99. I don't know if MSVC has an option to compile C with a certain standard. You may need to either switch compilers, or update your MSVC compiler you are currently using.
My guess is that you are using an older version of MSVC. They do not fully support C, but they have improved and support much of the important, more modern features of C (though technically, it still compiles using a C++ compiler). Older versions of MSVC only supported C89/90. The latest version supports the features of C99/C11 which are compatible with the latest C++ versions, so it should definitely compile if you have a newer version of MSVC installed.
Yeah. You were right. It was "bool". I don't know how to change the compile code. I just removed all the code calling common.c and was able to figure out what I needed to know after that.
Thank you guys. I apologize for the late reply.
Which version of MSVC are you using?
I'm running Visual Studio Community 2017 v15.5.6.