![]() |
|
Error when linking A5 static |
Aleksa
Member #14,874
January 2013
|
I followed this tutorial and after that I get these errors: ||=== Build: Debug in browser_allegro (compiler: GNU GCC Compiler) ===| |
Neil Roy
Member #2,229
April 2002
![]() |
Without seeing any of your source code, I would have to say, that according to the above error messages, you're comparing a pointer and integer. Start with the first error. What does line 20 of your main.c have? Also lines 36 and 43 are all doing the same thing, I assume with the same variables most likely. Also make sure you're linking in the right libraries. I compile all my Allegro 5 projects as static without problems using MinGW (GNU compiler). And with my latest project, I am using the same as you, 5.0.10 static. Here's what I include in my libs... (from Code::Blocks that would be in "Projects->Build Options->Linker Settings) gdiplus As well as the usual Allegro Libraries. Edit: also note the order they are added can be important. This works for me. --- |
jmasterx
Member #11,410
October 2009
|
Here are mine, but I use mscvc 1physfs.lib
2d3dx9.lib
3dsound.lib
4d3d9.lib
5opengl32.lib
6dxguid.lib
7dinput8.lib
8kernel32.lib
9user32.lib
10gdi32.lib
11comdlg32.lib
12ole32.lib
13Shlwapi.lib
14psapi.lib
15winmm.lib
16libFLAC-1.2.1-static-mt.lib
17freetype242MT.lib
18libogg_static.lib
19zlib-1.2.5-static-mt.lib
20gdiplus.lib
21libvorbis_static.lib
22dumb-0.9.3-static-mt.lib
23libvorbisfile_static.lib
24libcmt.lib
25allegro-static.lib
26allegro_shader-static.lib
27allegro_acodec-static.lib
28allegro_primitives-static.lib
29allegro_image-static.lib
30allegro_physfs-static.lib
31allegro_color-static.lib
32allegro_memfile-static.lib
33allegro_audio-static.lib
34allegro_dialog-static.lib
35allegro_ttf-static.lib
36allegro_font-static.lib
37agui.lib
38agui_allegro5.lib
39lacewing.lib
40ws2_32.lib
41mpr.lib
42mswsock.lib
43secur32.lib
44crypt32.lib
45openal-1.14-static-mt.lib
I also have networking and gui libraries in there and their dependencies. Agui GUI API -> https://github.com/jmasterx/Agui |
Aleksa
Member #14,874
January 2013
|
lines 20, 36 and 43 are not the problem problem is with "undefined reference to..." errors which are still here after re-adding all these: gdiplus Also what means "keep this as relative path"? {"name":"608853","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/a\/6a3ec16f1f76929b0f096ac7bb7499fa.png","w":905,"h":374,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/6\/a\/6a3ec16f1f76929b0f096ac7bb7499fa"} EDIT: After adding some physfs code i get this error messages (removed 23, 36 and 43 lines error): ||=== Build: Debug in browser_allegro (compiler: GNU GCC Compiler) ===| |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
Aleksa said: implicit declaration of function 'PHYSFS_init' You didn't include the physfs header. Quote: undefined reference to `inflateEnd' You didn't link to zlib. Quote: lines 20, 36 and 43 are not the problem if (al_init() == NULL) if (al_install_keyboard() == NULL) if (al_install_mouse() == NULL)
NULL and 0 are not the same thing. One is a pointer, the other is an integer. if (!al_init()) {/*...*/}
My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Aleksa
Member #14,874
January 2013
|
I cant find zlib on my computer ||=== Build: Debug in browser_allegro (compiler: GNU GCC Compiler) ===| |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
Aleksa said: undefined reference to `_Unwind_Resume'| This is usually caused by linking different versions of libraries. You probably have the wrong binaries for your version of MinGW. No, they are not cross compatible. If there are no binaries for your version of MinGW you have to build allegro yourself. But look here for the correct versions first : My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Neil Roy
Member #2,229
April 2002
![]() |
Just so you know, I use Code::Blocks with a separately installed MinGW v4.7.0 and the Allegro 5.0.10 binaries for 4.7.0 and it works beautifully. No compile problems at all. --- |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
Why would you have problems? Your libary's compiler versions match. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Neil Roy
Member #2,229
April 2002
![]() |
Wrong person, I was telling him what I use that works for me. --- |
Aleksa
Member #14,874
January 2013
|
Its probably because I installed a4 over a5 and some files might changed to older versions. I will reinstall a5. |
Edgar Reynaldo
Major Reynaldo
May 2007
![]() |
http://targonski.nazwa.pl/thedmd/allegro/5.0.10/allegro-5.0.10-mingw-4.7.0.7z Post the errors you are getting. My Website! | EAGLE GUI Library Demos | My Deviant Art Gallery | Spiraloid Preview | A4 FontMaker | Skyline! (Missile Defense) Eagle and Allegro 5 binaries | Older Allegro 4 and 5 binaries | Allegro 5 compile guide |
Neil Roy
Member #2,229
April 2002
![]() |
Allegro 4 has different filenames, so I doubt very much that would effect it. --- |
Aleksa
Member #14,874
January 2013
|
i will try that tomorow when i come home. I get same: ||=== Build: Debug in browser_allegro (compiler: GNU GCC Compiler) ===| |
|