I have problem when I compile my little program

This is my little program, it basic but is something :).

#include <stdio.h>
#include <allegro5/allegro.h>
#include <stdlib.h>


extern char allegro_id[];

And here is my problem that i can't solve:

[Linker error] undefined reference to `allegro_id'
ld returned 1 exit status

You now wich could be the problem?


I'm not sure that Allegro 5 has an allegro_id. Searches all reference Allegro 4. A different, incompatible version of the library. There is an al_get_allegro_version function that returns a packed integer... I assume that would be similar in purpose. What is it that you wanted allegro_id for?


Because you declared it extern.
EDIT: wait, no. Don't know.


The problem is that i don't know what is the allegro_id, if it is a file that is missing or doesn't exist. I try with an example downloaded from web and it gave me the same problem.


allegro_id does not exist in Allegro 5. Remove those two lines that reference it and move on. ???


ok, i am going to try it

[EDIT 1]

Okay,i try with another example but the error is the same. What do you recomend me to do?

Thanks for your help and attention.


Your examples are for Allegro 4. Where are you getting them?

Allegro 5 has some tutorials here: https://wiki.allegro.cc/index.php?title=Getting_Started#Tutorials

Thread #615994. Printed from Allegro.cc