[Clam-devel] [liblo-devel] windows binaries crosscompiled with mingw for linux

David García Garzón dgarcia at iua.upf.edu
Wed Jan 23 12:25:23 PST 2008


Just in case anyone is interested in this same task, I got liblo crosscompiled 
in mingw, that is, windows binaries generated from Linux.

Instructions are written in a wiki where we do the same with every dependency 
our project has. That includes pthreads which is a liblo dependency itself.

http://clam.iua.upf.edu/wikis/clam/index.php/Devel/Windows_MinGW_cross_compile

That works for liblo 2.4 and svn.

The main problems i found were:
- pthreads for win uses a different naming conventions for the library 
(libpthreadGE2.a instead liblo expected libpthread.a), i just did a symlink 
as already explained in csound mailing list
- crosscompiling for linux suposes an old Windows version for compatibility 
and winsocket2 headers doesn't define some sockets related symbols. I just 
defined _WIN32_WINNT=0x0501 (>=winxp, i think)
- There was a function (WSAAPI gai_strerrorA) redefined in src/server.c that 
it is already available on standard mingw headers. I commented it out.
- I had to explicitly add the ws2_32 (winsocket2) library to link it

While the first two issues are not because liblo and can be easily fixed using 
the proper autogen options, the third one requires editing src files and it 
would be nice have it fixed. I don't know which problem address such a 
redefinition but it would be nice if it can be inside some #ifdef that is not 
WIN32

I would be nice too if the pkg-config file is generated with the ws2_32 
library dependency when you are in such a context.

Thanks.

-- 
David García Garzón
(Work) dgarcia at iua dot upf anotherdot es
http://www.iua.upf.edu/~dgarcia
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.clam-project.org/pipermail/clam-devel-clam-project.org/attachments/20080123/6aef62da/attachment-0003.pgp>


More information about the clam-devel mailing list