I want to get Allegro 4 (MSCV 9) to work with Qt Creator. I am using Windows XP. I have added these lines to my .pro:
INCLUDEPATH += C:/Allegro/include \
LIBS += C:/Allegro/lib/allegro-4.4.2-md.lib \
C:/Allegro/lib/allegro-4.4.2-monolith-md.lib \
C:/Allegro/lib/allegrogl-0.4.4-md.lib \
C:/Allegro/lib/loadpng-1.5-md.lib \
My code looks like this:
#include <iostream>
#include <allegro.h>
volatile int closedWindow = false;
void CloseButtonCallback() {closedWindow = true;}
END_OF_FUNCTION(CloseButtonCallback())
int main()
{
allegro_init();
set_color_depth(32);
set_gfx_mode(GFX_AUTODETECT_WINDOWED, 400, 300, 0, 0);
set_window_title("Testing");
LOCK_FUNCTION(closeButtonCallback)
set_close_button_callback(CloseButtonCallback);
while(!closedWindow){}
allegro_exit();
return 0;
}
END_OF_MAIN()
And I keep getting errors like these, when I try to compile:
main.obj:-1: error: LNK2019: unresolved external symbol imp__allegro_exit referenced in function "int __cdecl _mangled_main(void)" (?_mangled_main@@YAHXZ) main.obj:-1: error: LNK2019: unresolved external symbol _imp_set_close_button_callback referenced in function "int __cdecl _mangled_main(void)" (?_mangled_main@@YAHXZ) main.obj:-1: error: LNK2019: unresolved external symbol _imp_set_window_title referenced in function "int __cdecl _mangled_main(void)" (?_mangled_main@@YAHXZ) main.obj:-1: error: LNK2019: unresolved external symbol _imp_set_gfx_mode referenced in function "int __cdecl _mangled_main(void)" (?_mangled_main@@YAHXZ) main.obj:-1: error: LNK2019: unresolved external symbol _imp_set_color_depth referenced in function "int __cdecl _mangled_main(void)" (?_mangled_main@@YAHXZ) main.obj:-1: error: LNK2019: unresolved external symbol __imp_install_allegro_version_check referenced in function "int __cdecl _mangled_main(void)" (?_mangled_main@@YAHXZ)