I'm trying to build ImageMagick 6.8.4 on my Win7 machine using MinGW / MSYS (latest version, gcc 4.7.2) and ran into errors at the linking stage in the make procedure. Specifically, socket send/recv were "undefined" in distribute-cache.c
I googled a general "send/recv" build issue with windows and MinGW, and found that -lws2_32 needed to be added as a library. I attempted to hand-hack the Makefile to add -lws2_32 at the end of the library list, and at least at the end of the configure step it was showing.
However, during build it still threw undefined errors.
Since I don't need the distributed caching (I will be using ImageMagick primarily to load various file types into OpenGL), here is my workaround:
at the top of distribute-cache.c under "Define declerations" i added the following
Code: Select all
#ifdef __WIN32__
#undef send
#undef recv
int do_nothing() { return 0;}
#define send(x, y, z, w) do_nothing()
#define recv(x, y, z, w) do_nothing()
#endif
this allowed my to successfully build.
I'm still not sure if this is something to do with my particular system or what, but I thought I'd put this up here in case someone else was running into the issue