What I'm including wrong? undefined reference to al_init_image_addon error?

Up vote 0 down vote favorite share g+ share fb share tw.

I am using codeblocks + allegro5 + ubuntu 11.10 and getting this 2 errors undefined reference to 'al_init_image_addon' undefined reference to `al_init_primitives_addon'| I did install allegro5 correctly with all the dependencies. The first tutorial on loading the allegro. H works fine, it creates a normal window apart from the xterm window.

I am following the "show in fullscreen tutorial" from the allegro wiki #include "allegro5/allegro. H" #include "allegro5/allegro_image. H" #include #include "allegro5/allegro_native_dialog.

H" int main() { ALLEGRO_DISPLAY *display = NULL; ALLEGRO_DISPLAY_MODE disp_data; al_init(); al_init_image_addon().

The only thing I put in the linker is this.... pkg-config --libs allegro-5.0 – HoNgOuRu Feb 9 at 19:04 thank you just added /usr/lib/liballegro_image. So /usr/lib/liballegro_primitives. So to the link libraries and that did the trick – HoNgOuRu Feb 9 at 19:37.

Well, after doing a little google search and posting at allegro's homepage I got the correct answer, I was missing the . So files in the linker section under TOOLS > Compiler&DEbugger > LINKER. I had to add these lines /usr/lib/liballegro_dialog.

So /usr/lib/liballegro_color. So /usr/lib/liballegro_audio. So /usr/lib/liballegro_image.

So /usr/lib/liballegro_physfs. So /usr/lib/liballegro. So /usr/lib/liballegro_font.

So /usr/lib/liballegro_acodec. So /usr/lib/liballegro_main. So /usr/lib/liballegro_memfile.

So /usr/lib/liballegro_primitives. So /usr/lib/liballegro_ttf. So and `pkg-config --libs allegro-5.0` see this post for the screenshot.

hongouru.blogspot.com/2012/02/solved-all....

You should do it like: pkg-config --libs allegro-5.0 allegro_dialog-5.0 i.e. , List all of the Allegro libs you are using on the pkg-config line. If you link some directly, you may miss dependencies that they rely on.

– Matthew Feb 10 at 15:59.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions