Hello Forum. I was wondering if anybody could help me out? I've downloaded the Allegro 4.9.16 MinGW32 binaries from allegro5.org, but I'm having trouble using them with Code::blocks. I did the following things:
1) Unpack the binaries to d:\Coding\allegro-4.9.16-mingw-bin\
2) Downloaded the dx9 for mingw from the same place and unpacked them into the MinGW directory
3) Added the allegro-4.9.16-mingw-bin\include and allegro-4.9.16-mingw-bin\lib paths to the Compiler and Linker search directories respectively
4) In the Project->Build Options->Linker settings->link libraries list, I added all the '.a' files from allegro-4.9.16-mingw-bin\lib to the list
5) Tried to compile the following code
#SelectExpand
1#define ALLEGRO_STATICLINK 1
2#include <allegro5/allegro.h>
3
4int main
(void)
5{
6 al_init
();
7
8 ALLEGRO_DISPLAY
*display
= al_create_display
(640,
480);
9
10 al_clear_to_color
(al_map_rgb
(0,
150,
0));
11
12 al_flip_display
();
13
14 al_rest
(5);
15
16 return 0;
17}
18END_OF_MAIN()
and got the following errors (it's a big list so I've only included the first lot)
#SelectExpand
1C:\Users\Nick\Desktop\temp\test\main.cpp||In function `int _mangled_main()':|
2C:\Users\Nick\Desktop\temp\test\main.cpp|8|warning: unused variable 'display'|
3D:\Coding\allegro-4.9.16-mingw-bin\lib\liballegro-static-4.9.16.a(wnewsys.c.obj)||In function `win_get_path':|
4C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wnewsys.c|448|undefined reference to `GetModuleFileNameExA@16'|
5C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wnewsys.c|407|undefined reference to `GetModuleFileNameExA@16'|
6D:\Coding\allegro-4.9.16-mingw-bin\lib\liballegro-static-4.9.16.a(wnewsys.c.obj)||In function `win_shutdown':|
7C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wnewsys.c|201|undefined reference to `timeEndPeriod@4'|
8D:\Coding\allegro-4.9.16-mingw-bin\lib\liballegro-static-4.9.16.a(wnewsys.c.obj)||In function `win_initialize':|
9C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wnewsys.c|157|undefined reference to `timeBeginPeriod@4'|
10D:\Coding\allegro-4.9.16-mingw-bin\lib\liballegro-static-4.9.16.a(wtime.c.obj)||In function `al_init_timeout':|
11C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wtime.c|147|undefined reference to `timeGetTime@0'|
12C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wtime.c|144|undefined reference to `timeGetTime@0'|
13D:\Coding\allegro-4.9.16-mingw-bin\lib\liballegro-static-4.9.16.a(wtime.c.obj)||In function `al_win_init_time':|
14C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wtime.c|102|undefined reference to `timeGetTime@0'|
15D:\Coding\allegro-4.9.16-mingw-bin\lib\liballegro-static-4.9.16.a(wtime.c.obj)||In function `low_res_current_time':|
16C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wtime.c|49|undefined reference to `timeGetTime@0'|
17D:\Coding\allegro-4.9.16-mingw-bin\lib\liballegro-static-4.9.16.a(d3d_disp.cpp.obj)||In function `d3d_generate_display_format_list':|
18C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\d3d_disp.cpp|556|undefined reference to `_Unwind_Resume'|
19C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\d3d_disp.cpp|555|undefined reference to `_Unwind_Resume'|
20D:\Coding\allegro-4.9.16-mingw-bin\lib\liballegro-static-4.9.16.a(d3d_disp.cpp.obj)||In function `al_d3d_init_display':|
21C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\d3d_disp.cpp|858|undefined reference to `Direct3DCreate9@4'|
22D:\Coding\allegro-4.9.16-mingw-bin\lib\liballegro-static-4.9.16.a(d3d_disp.cpp.obj):d3d_disp.cpp:(.eh_frame+0x12)||undefined reference to `__gxx_personality_v0'|
23D:\Coding\allegro-4.9.16-mingw-bin\lib\liballegro-static-4.9.16.a(wgl_disp.c.obj)||In function `init_temp_context':|
24C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wgl_disp.c|152|undefined reference to `wglCreateContext@4'|
25C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wgl_disp.c|159|undefined reference to `wglMakeCurrent@8'|
26C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wgl_disp.c|162|undefined reference to `wglDeleteContext@4'|
27D:\Coding\allegro-4.9.16-mingw-bin\lib\liballegro-static-4.9.16.a(wgl_disp.c.obj)||In function `is_wgl_extension_supported':|
28C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wgl_disp.c|106|undefined reference to `glGetString@4'|
29C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wgl_disp.c|109|undefined reference to `wglGetProcAddress@4'|
30D:\Coding\allegro-4.9.16-mingw-bin\lib\liballegro-static-4.9.16.a(wgl_disp.c.obj)||In function `setup_gl':|
31C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wgl_disp.c|91|undefined reference to `glViewport@16'|
32C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wgl_disp.c|93|undefined reference to `glMatrixMode@4'|
33C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wgl_disp.c|94|undefined reference to `glLoadIdentity@0'|
34C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wgl_disp.c|95|undefined reference to `glOrtho@48'|
35C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wgl_disp.c|97|undefined reference to `glMatrixMode@4'|
36D:\Coding\allegro-4.9.16-mingw-bin\lib\liballegro-static-4.9.16.a(wgl_disp.c.obj)||In function `wgl_update_display_region':|
37C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wgl_disp.c|1299|undefined reference to `glFlush@0'|
38D:\Coding\allegro-4.9.16-mingw-bin\lib\liballegro-static-4.9.16.a(wgl_disp.c.obj)||In function `wgl_set_current_display':|
39C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wgl_disp.c|1112|undefined reference to `wglGetCurrentContext@0'|
40C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wgl_disp.c|1116|undefined reference to `wglMakeCurrent@8'|
41D:\Coding\allegro-4.9.16-mingw-bin\lib\liballegro-static-4.9.16.a(wgl_disp.c.obj)||In function `display_thread_proc':|
42C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wgl_disp.c|1258|undefined reference to `wglDeleteContext@4'|
43D:\Coding\allegro-4.9.16-mingw-bin\lib\liballegro-static-4.9.16.a(wgl_disp.c.obj)||In function `get_available_pixel_formats_ext':|
44C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wgl_disp.c|723|undefined reference to `wglGetCurrentContext@0'|
45C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wgl_disp.c|724|undefined reference to `wglGetCurrentDC@0'|
46D:\Coding\allegro-4.9.16-mingw-bin\lib\liballegro-static-4.9.16.a(wgl_disp.c.obj)||In function `init_pixel_format_extensions':|
47C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wgl_disp.c|178|undefined reference to `wglGetProcAddress@4'|
48C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wgl_disp.c|180|undefined reference to `wglGetProcAddress@4'|
49D:\Coding\allegro-4.9.16-mingw-bin\lib\liballegro-static-4.9.16.a(wgl_disp.c.obj)||In function `get_available_pixel_formats_ext':|
50C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wgl_disp.c|773|undefined reference to `wglMakeCurrent@8'|
51C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wgl_disp.c|775|undefined reference to `wglDeleteContext@4'|
52C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wgl_disp.c|778|undefined reference to `wglMakeCurrent@8'|
53C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wgl_disp.c|773|undefined reference to `wglMakeCurrent@8'|
54D:\Coding\allegro-4.9.16-mingw-bin\lib\liballegro-static-4.9.16.a(wgl_disp.c.obj)||In function `create_display_internals':|
55C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wgl_disp.c|949|undefined reference to `wglCreateContext@4'|
56C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wgl_disp.c|960|undefined reference to `wglMakeCurrent@8'|
57D:\Coding\allegro-4.9.16-mingw-bin\lib\liballegro-static-4.9.16.a(wgl_disp.c.obj)||In function `init_ogl_context_ex':|
58C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wgl_disp.c|661|undefined reference to `wglGetCurrentContext@0'|
59C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wgl_disp.c|662|undefined reference to `wglGetCurrentDC@0'|
60C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wgl_disp.c|683|undefined reference to `wglMakeCurrent@8'|
61C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wgl_disp.c|685|undefined reference to `wglDeleteContext@4'|
62C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wgl_disp.c|688|undefined reference to `wglMakeCurrent@8'|
63D:\Coding\allegro-4.9.16-mingw-bin\lib\liballegro-static-4.9.16.a(wgl_disp.c.obj)||In function `init_context_creation_extensions':|
64C:\Documents and Settings\Trent Gamblin\4.9.16\src\win\wgl_disp.c|197|undefined reference to `wglGetProcAddress@4'|
65D:\Coding\allegro-4.9.16-mingw-bin\lib\liballegro-static-4.9.16.a(wgl_disp.c.obj)||In function `init_ogl_context_ex':|
I'm not entirely sure what I'm doing wrong, or how I should resolve this. Can anybody help?