[AD] Linker error with MSVC (_al_set_display_invalidated_callback)

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


I got a linker error trying to compile Allegro r13426 with MSVC 2010:
2> Creating library C:/allegro/allegro.2010.build/lib/Debug/allegro_primitives-debug.lib and object C:/allegro/allegro.2010.build/lib/Debug/allegro_primitives-debug.exp
2>prim_directx.obj : error LNK2019: unresolved external symbol __al_set_display_invalidated_callback referenced in function _setup_default_shader
2>C:\allegro\allegro.2010.build\lib\Debug\allegro_primitives-debug-4.dll : fatal error LNK1120: 1 unresolved externals

I fixed it by wrapping the _al_set_display_invalidated_callback in an AL_FUNC macro:
AL_FUNC(void, _al_set_display_invalidated_callback, (ALLEGRO_DISPLAY* display, AL_METHOD(void, display_invalidated, (ALLEGRO_DISPLAY*))));

Is that the right way to fix it?

John


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/