[mad-dev] WIn32 library

Chad Austin aegis@aegisknight.org
Thu, 31 May 2001 11:35:35 -0800

> just made a patch, if anyone is interested to look at them:
> http://www.asamnet.de/~finkm/mad-patch.diff

Cool, thanks for atually doing the work.  :)

> In my opinion, there are some changes that are unnecessary, for
> example the introduction of the symbol MAD_EXTERN_C. since *.c files
> are always compiled using extern "C" linkage (at least in VC++), that
> is unneeded I think. Just list your exports in a separate .def file.

Well...  I added those because Acoustique is C++, and I would do:

#include "resample.h"  // the functions in here weren't extern "C" so
                       // the C++ compiler would assume the names were mangled

Trust me, it is necessary.  :)

> Another thing are constructs like
> #ifdef _MSC_VER /* VC++ */
> #define MAD_INLINE __inline
> #else           /* assume gcc */
> #define MAD_INLINE inline
> #endif
> just provide a custom config.h, define HAVE_CONFIG_H and all things
> will be good :-) I could provide one for win32 I anyone cares

That's fine, even though I really don't like config.h files.  I'd be perfectly
happy if libmad got a config file that let it build "out of the box" in VC++
though.  :)

> The type casts on the functions are ok I think, it makes the VC++ not
> warn so often, maybe Rob considers it to build it into libmad

I added those because I was trying to build with warning level four, but VC++
really, really sucks in that warning level four starts giving you a bunch of
useless information like "This inline function is never used."  I couldn't
get around that without uncommenting the inline function, so I just put it back
on level three.  When VS .NET comes out (man that will be nice) all of these
problems will be fixed, so we can stick it back on warning level four.  :)

Chad Austin