|
Allegro 5 initializer element is not constant |
Estherial
Member #16,593
November 2016
|
Hello guys.I am trying to make a paint program with C. Using allegro 5. 1#include <allegro5\allegro.h>
2#include <allegro5\allegro_primitives.h>
3#include <allegro5\allegro_image.h>
4ALLEGRO_BITMAP *bmp,*arkaplan,*resim;
5ALLEGRO_DISPLAY *display;
6ALLEGRO_COLOR renk=al_map_rgb(0,0,0); //In this line i had a "initializer element is not constant" error
I can't upload all lines because it's a college project and our lecturer doesn't want a copy paste project. Maybe the people can copy paste it. How can i solve this problem? |
Edgar Reynaldo
Major Reynaldo
May 2007
|
You can't call allegro functions before main and al_init; Simply predeclare the color and then assign it later after al_init if you want it to be global. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Estherial
Member #16,593
November 2016
|
Can you check your inbox please? |
Estherial
Member #16,593
November 2016
|
I sent another pm. You know why i can't use here. Can you check? Thanks a lot Edgar. |
|