libimobiledevice / libusbmuxd

A client library to multiplex connections from and to iOS devices
https://libimobiledevice.org
GNU Lesser General Public License v2.1
574 stars 270 forks source link

Building on Windows with MSYS2 #101

Closed jangxx closed 3 years ago

jangxx commented 3 years ago

I am trying to build a static or dynamic library which is usable in Windows applications. I have downloaded the 2.0.2 release and used MSYS to run ./configure, and make. Unfortunately this leaves me with an .a file, which is (as far as I understand it) a Linux specific format for static libraries, which I can't use for Windows projects. Is there any way to build a .lib or a .dll with this project?

jangxx commented 3 years ago

Okay, I figured it out. I had to use MINGW instead of MSYS, which let me build libplist as a .dll without any required msys.dll shenanigans. Also, .a files can be used as .lib files, either by renaming them, or by just linking against the .a file itself. In theory the same approach should let me build libusbmuxd as well, but unfortunately there is a problem with the socket APIs. That is a problem for another issue, however.