[Icecast-dev] [PATCH] Compilation of libshout with MinGW

Роман Донченко DXDragon at yandex.ru
Sat Jan 31 11:39:55 PST 2009


Hello,

Attached is a patch which makes libshout compile on Win32 with MinGW/MSYS.
I suppose some explanations are in order.

* Various definitions were only necessary when compiling with MSVC. GCC
already has them, and they caused some redefinition errors.
* The timing library requires gettimeofday or ftime, but configure.ac
didn't have checks for either. Added.
* I removed the dependency on automake 1.6, because MSYS doesn't have it,
and it didn't seem to break anything (wink).
* sleep doesn't exist on Windows, so I tweaked nonblocking.c to use Sleep
instead.
* Both examples were made to put stdin in binary mode on Windows, since
failure to do so leads to unusability.

With these changes, the library builds and appears to be usable. Also note
that I had to compile with "make LDFLAGS=-no-undefined", or libtool
complained:

libtool: link: warning: undefined symbols not allowed in i686-pc-mingw32
shared libraries

and didn't build a DLL. Since I don't know much about the GNU build
system, I refrained from making any permanent changes.

Roman.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: libshout-mingw.patch.txt
Url: http://lists.xiph.org/pipermail/icecast-dev/attachments/20090131/33e1ef08/attachment.txt 


More information about the Icecast-dev mailing list