- Online Community Forums » Programming Questions » al_init_primitives_addon is undefined VS2017 Nuget

This thread is locked; no one can reply to it. rss feed Print
al_init_primitives_addon is undefined VS2017 Nuget
Member #17,244
December 2019

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

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 instead of and everything compiles

Rodolfo Lam
Member #16,045
August 2015

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

Member #17,244
December 2019

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

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

Go to: