Archive for February, 2008
Free As In Freedom
Tuesday, February 26th, 2008libshout on Win32
Friday, February 8th, 2008The official libshout-2.2.2 release doesn’t build out-of-the-box on Windows.
However, with some effort you can get it to build as a static DLL on Cygwin (if you undefine _WIN32 everywhere and unset some options in config.h)
With even more effort you can build a native Windows .DLL with VisualStudio 2005 but you’ll need to make (at least) the following changes to the project:
- Get all the dependencies: ogg & vorbis from xiph.org (they should build in VS2005 after migration from VS6 without problems). You’ll also need Win32 pthreads – look it up on Google (the distribution already contains pre-built VS DLLs).
- Configure the VS2005 solution so that it can find the header and .lib files for ogg, vorbis and pthreads.
- You need to manually add vorbis.c to the project after the migration to VS2005.
- Fix compilation errors (i.e. define size_t in vorbis.c, replace va_copy with memcpy, fix void pointer arithmetic)
- Mark the public API functions as __declspec(dllexport)
I’ve successfully used the so produced DLL with my ctypes-python-shout bindings to connect to a Windows Icecast instance – therefore having the whole stack running entirely on Win32.
I’ll post more details as well as a both binary and source (VS2005 solution) snapshots of libshout 2.2.2 (and all dependencies and required fixes), as soon as I can.