I've been having some trouble getting the JpgAlleg addon for Allegro 4.4.3 to build in debug mode. I've narrowed the problem down to it being built with the default C standard (I don't know what that is). It builds fine with -std=c90 though, without warnings, and without linker errors.
So my question is, is Allegro 4.4.3 supposed to be built as C90 code? What is the standard that Allegro is adhering to?
I finally figured it all out by making a test case. The problem is with a function declaration for the get_value function being declared as _inline_ in jpgalleg in decode.c. When building the debug version of jpgalleg there is no standard specified and the linker throws an error saying there is an undefined reference to the inlined function get_value. The only instances of calls to the get_value function appear below its definition in the same source file, so I'm not sure why the linker is looking for an out of line version of get_value.
It must be something to do with the way the default behavior is handled because the problem doesn't appear with GCC 4.8.1. It only started when I tried to compile Allegro 4.4.3 and JpgAlleg with GCC 5.3.0.
I have attached a zip file of the test case. There are two batch scripts for building the test. CompileC90.bat and CompileNoSTD.bat. One compiles as C90 and the other uses the default standard (whatever that is).
You need GCC 5.3.0 to see this behavior. The script uses mingw32-gcc as the c compiler.
As soon as this issue is resolved, I can finish my build of Allegro 4.4.3 and make a release.
I'm more than willing to make a patch for this, but I don't know how to proceed. I'm not sure what the correct way to enforce inlining is, and it depends on the standard being used.
I tried to build Allegro 4.4.3 with -std=c90 and it fails at 26% in rotate.c due to C++ style comments