On Thu, 31 May 2001 11:35:35 -0800, Chad Austin aegis@aegisknight.org wrote:
Hi,
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. :)
Not necessarily :)
to access the library functions, I built a mad.h from the mad.h.sed script (using my linux box), edited that file a bit:
// C linkage for all functions #ifdef __cplusplus extern "C" { #endif
[...]
#ifdef __cplusplus } #endif
and it works with C and C++ :-)
If you like, I could upload a little demo project where libmad is built and a little example program tries to open an mp3 and decodes it. "tries to", because all I got from that mp3 file are samples with 0's :-)
Ok, I've uploaded the little example with a prebuilt release libmad.dll: http://www.asamnet.de/~finkm/minimad.zip
bye Michael