|
This thread is locked; no one can reply to it. |
1
2
|
Allegro 5.1.12 released! |
Elias
Member #358
May 2000
|
Just realized, this is probably similar to how "x = &memcpy" and "x = memcpy" are identical in C++, here the & for the function pointer is optional. Still, it's a mystery why MSVC 2013 would sometimes have a compile error and sometimes not. -- |
Rodolfo Lam
Member #16,045
August 2015
|
So maybe you found a compiler bug? It's always funny to try to convince compiler devs their side is wrong and not our code...
|
tobing
Member #5,213
November 2004
|
It's not a compiler bug, it was a warning actually and I'm compiling with warnings as error whenever I can. Warnings can find pretty interesting things in your code... |
Thomas Fjellstrom
Member #476
June 2000
|
tobing said: It's not a compiler bug, it was a warning actually and I'm compiling with warnings as error whenever I can. Warnings can find pretty interesting things in your code... But -Werror is rarely useful -- |
SiegeLord
Member #7,827
October 2006
|
We can't compile Allegro with -Werror because CMake's compile check tests will often fail in that situation. It'd be a lot of pain to fix all of them. Allegro's source itself should compile without warnings (and does on Linux). It'd be nice to do so on MSVC, but many of the warnings are completely terrible (especially the warning for while(1) loops), so we'd have to disable a good portion of them first. "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
tobing
Member #5,213
November 2004
|
I guess that the usefulness of warnings strongly depends on the compiler, but I'm trying to write code that is free of warnings whenever possible. Currently I'm porting one of my allegro apps to native 64 bit, and for that all the warnings about losing digits in conversion can be a nuisance - or hint to where things have to be adapted. With MSVC 2013 I'm using /W3 /WX which does not make ALL warnings to errors, but all of level 3 and below. Plus I have disabled warning 4996 (about using deprecated stuff) and 4267 (conversion from size_t loses digits) for the 64 bit version. With that, all of allegro compiles and works just fine... |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Hey guys, just wondered if there is a way to configure cmake to detect the static versions of libraries like ogg, vorbis, and theora instead of the dlls when I select SHARED=off for the build type. I know I can set the libraries to link manually, but this just bit me while I was trying to build fully static example programs. They linked to the dll.a files by default. I should have some MinGW 4.8.1 binaries for 5.1.12 here in the next few days or so. 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 |
Elias
Member #358
May 2000
|
What I do is "rm lib/*.dll.a" and then cmake magically picks up the static libraries. Then whenever there's a mingw update I forget about it and am mystified for an hour why my static .exe doesn't work any longer If there is a way to do it in cmake that would be nice, but I kinda doubt it, having worked with cmake a lot. -- |
SiegeLord
Member #7,827
October 2006
|
You'd need to fiddle with all the Find* functions (something like that is done by the audio addon). It's possible, but I'd just do what Elias said. "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Okay, I've been struggling with this for a few days now. I keep getting undefined references to libpng functions when trying to compile allegro 5.1.12. 1[ 55%] Linking CXX executable ex_color.exe
2
3c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../..\libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x4f0c): undefined reference to `png_get_error_ptr'
4c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../..\libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x4f2a): undefined reference to `png_set_longjmp_fn'
5c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../..\libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x740e): undefined reference to `png_create_read_struct'
6c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../..\libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x7424): undefined reference to `png_create_info_struct'
7c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../..\libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x744a): undefined reference to `png_set_longjmp_fn'
8c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../..\libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x7477): undefined reference to `png_destroy_read_struct'
9c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../..\libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x74ba): undefined reference to `png_set_read_fn'
10c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../..\libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x74cc): undefined reference to `png_read_info'
11c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../..\libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x7511): undefined reference to `png_get_IHDR'
12c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../..\libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x759f): undefined reference to `png_destroy_read_struct'
13c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../..\libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x75dd): undefined reference to `png_set_palette_to_rgb'
14c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../..\libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x7602): undefined reference to `png_get_valid'
15c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../..\libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x7652): undefined reference to `png_set_filler'
16c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../..\libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x7664): undefined reference to `png_read_update_i[ 55%] nfoLinking CXX executable ex_config.exe'
17
18c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../..\libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x76a9): undefined reference to `png_get_IHDR'
19c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../..\libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x76e0): undefined reference to `png_set_read_user_transform_fn'
20c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../..\libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x7761): undefined reference to `png_read_image'
21c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../..\libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x7782): undefined reference to `png_read_end'
22c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../..\libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x7792): undefined reference to `png_set_interlace_handling'
23c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../..\libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x77a2): undefined reference to `png_set_gray_to_rgb'
24c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../..\libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x77b2): undefined reference to `png_set_packing'
25c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../..\libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x77c2): undefined reference to `png_set_tRNS_to_alpha'
26c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../..\libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x77d2): undefined reference to `png_set_expand_gray_1_2_4_to_8'
27c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../..\libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x77e2): undefined reference to `png_set_strip_16'
28c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../..\libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x782b): undefined reference to `png_set_read_user_transform_fn'
29c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../..\libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x78f7): undefined reference to `png_get_io_ptr'
30c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../..\libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x7934): undefined reference to `png_get_error_ptr'
31c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../..\libfreetype.a(sfnt.c.obj):sfnt.c:(.text+0x794a): undefined reference to `png_error'
I've completely deleted freetype and libpng from my mingw installation and rebuilt them from scratch as well as deleting the allegro build directory and rebuilding allegro. I can't get rid of these errors. It must mean I'm linking to the wrong version of libpng somehow, right? Ideas? For reference I'm using freetype 2.6.1 and libpng 1.6.18 in my build of allegro. 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 |
SiegeLord
Member #7,827
October 2006
|
It might be a new thing for Freetype to require png support (did you compile it yourself?), as Allegro build system doesn't link libpng when linking in freetype. "For in much wisdom is much grief: and he that increases knowledge increases sorrow."-Ecclesiastes 1:18 |
Edgar Reynaldo
Major Reynaldo
May 2007
|
Yes, I built freetype and libpng myself with cmake. That was it too. The new version of Freetype requires png to be linked in. I just added png and zlib to the CXX and C LINKER FLAGS fields and then everything built okay. Edit - Update I have the binaries for A5.1.12 and MinGW 4.8.1 ready. You can get them here : And you can always get the latest version here : If you have any problems with them, report them here on the forums and I will work on a fix for you. I think everything should work out of the box this time. Dependencies are included, such as FLAC, freetype2, libpng16, ogg, theora, vorbis, dumb, and openAL. Enjoy! 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 |
Peter Hull
Member #1,136
March 2001
|
Possibly it's an optional dependency (I am looking at the CMakeLists.txt)
|
Edgar Reynaldo
Major Reynaldo
May 2007
|
You mean openAL? Yeah, it's optional. I forgot to turn it off though, so it's still there. :/ Edit Edit2 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 |
AMCerasoli
Member #11,955
May 2010
|
Respect
|
|
1
2
|