[vorbis-dev] Problems linking against libvorbis.a with GnuWin32

Andy Key scsiprog at hotmail.com
Mon Jul 10 04:23:22 PDT 2000



Hi Florian,

Mingw32 doesn't have rint predefined, so it should use the macro.  I've 
modified the #ifdef jungle in lib/os.h on my local copy to take this into 
account.  Most of the time, it seems as if you can use #ifdef __GNUC__ to 
take into account Mingw32 and CygWin, but this one doesn't quite work.

See if the following won't work for you in lib/os.h -- find the #ifdef's 
that handle alloca() and rint() and replace them with:

#if !defined(__GNUC__) || defined(__MINGW32__)
#ifdef _WIN32
#ifndef __MINGW32
#  define alloca(x) (_alloca(x))
#endif
#  define rint      (floor((x)+0.5)
#endif
#endif

-Andy Key

>I'm trying to link against libvorbis.a using GnuWin32
>without the Cygwin layer (that is, Mingw32). Unfortunately
>the linker complains about a missing function: rint().
>This function is used a couple of times in libvorbis and
>as far as I understand this is a standard C library function.
>
>My problem is, that I cannot find rint() in any of the common DLLs
>nor do I know how MSVC resolves this function. Any ideas?????

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/



More information about the Vorbis-dev mailing list