al_init_primitives_addon is undefined VS2017 Nuget
godzilla62

I've installed allegro 5 in visual studio 2017,
I've used nuget to install allegro packages
I've checked Primitives add on to yes under project properties / allegro 5
Image package works

#SelectExpand
1#include "allegro5/allegro.h" 2#include "allegro5/allegro_primitives.h" 3#include "allegro5/allegro_image.h" 4#include "allegro5/allegro_native_dialog.h" 5(main section of code) 6 ALLEGRO_DISPLAY *display = NULL; 7 ALLEGRO_BITMAP *image = NULL; 8 9 if (!al_init()) { 10 al_show_native_message_box(display, "Error", "Error", "Failed to initialize allegro!", 11 NULL, ALLEGRO_MESSAGEBOX_ERROR); 12 return 0; 13 } 14if (!al_init_primitives_addon()) { 15 al_show_native_message_box(display, "Error", "Error", "Failed to initialize al_init_primitives_addon!", 16 NULL, ALLEGRO_MESSAGEBOX_ERROR); 17 return 0; 18 }

Seems that library might be missing,
**Fixed For Now*** == loaded allegro version 5.2.2.1 instead of 5.2.5.2 and everything compiles

Rodolfo Lam

Broken VS Studio 2017 support for newer versions of the library maybe?

godzilla62

Hi, tried loading each version up from nuget, for some reason the latest version 5.2.5.2 works now, must be file missing and older version fixed it.

So if you have this problem load older version, then load the latest.

Thread #618005. Printed from Allegro.cc