Building theora 1.1.1 with mingw-w64-gcc 7.1 and msys
Edgar Reynaldo <[email protected]> Thu, 1 Jun 2017 14:53:29 -0500
| Newsgroups | gmane.comp.multimedia.ogg.theora.general |
|---|---|
| Message-ID | <[email protected]> |
Hello,
I recently attempted to build theora 1.1.1 with mingw-w64-gcc 7.1 and
msys and it fails to build the encoder_example.c example program. There
are multiple declarations of the function 'rint'. The source file
created its own version of the function that rounds AWAY from zero.
MinGW-W64 has its own version of the 'rint' function, which does not
round away from zero. Therefore, encoder_example.c's rint function is
necessary, but needs to be renamed because it includes math.h, which
defines "extern __cdecl double rint(double)".
Here is the relevant function from encoder_example.c lines 50-62 :
#ifdef _WIN32
/*supply missing headers and functions to Win32. going to hell, I know*/
#include <fcntl.h>
#include <io.h>
static double rint(double x)
{
if (x < 0.0)
return (double)(int)(x - 0.5);
else
return (double)(int)(x + 0.5);
}
#endif
Is this fixed in more recent versions? Should I use 1.2 alpha? Should I
build from the latest repository source? Ideas?
I'm willing to submit a patch, but I don't know what the resulting
function should be renamed.
Edgar
_______________________________________________
theora mailing list
[email protected]
http://lists.xiph.org/mailman/listinfo/theora