I am new to Allegro 5 and Visual Studio... I'm trying to run a simple code:
#include <allegro5/allegro.h>
#include <allegro5/allegro_image.h>
int main(){
al_init();
al_init_image_addon();
return 0;
}
And it returns an error:
LNK2019 Unrecognized external symbol __imp__al_init_image_addon referred in function _main
I already install Allegro5 from NuGet packages and enable add ons on project properties... but it still doesn't work...
Please if anyone has a solution, tell me, because I am breaking my head thinking it xD
If I delete the line al_init_image_addon(); it works perfectly and also U can create and destroy displays, for example... but the add ons simply doesn't work.
Kudos for using allegro :)
I think I once had a similar issue, try this:
Make sure you have the Allegro and AllegroDeps (both by allegro developers installed via nuget).
Right click on your 'project' (not solution) in the 'Solution Explorer' (normally on the right hand side) and go Properties.
There should be an 'Allegro 5' section:
Be sure to toggle 'Image Addon' to 'Yes' (and depending on what other addons you want turn them to yes too).
Hope this helps :)