Allegro 5 crashes on calling al_clear_to_color(ALLEGRO_COLOR)
问题 I'm starting at Allegro 5, but soon I got stuck in the second hello-world-like program I'm coding. After some debugging, I concluded that the program crashes when it calls the function al_clear_to_color(ALLEGRO_COLOR) . I've tried linking allegro statically and dynamically, but the problem still remains. I'm completely lost. Here is the code: #include <cstdio> #include <allegro5/allegro.h> int main() { ALLEGRO_DISPLAY *display; ALLEGRO_KEYBOARD_STATE kbState; if(!al_init()) return 0; if(!al