AnsweredAssumed Answered

cross compiling libiio for windows

Question asked by ahelak on Mar 24, 2015
Latest reply on Apr 24, 2015 by pcercuei

Hi,

 

I had a need for a libiio dll today, and the windows binaries provided here looked to be a bit out of date: http://wiki.analog.com/resources/tools-software/linux-software/libiio

 

I didn't see any build instructions for windows, so I ended up cross-compiling libiio from x86 linux for win32. With a few minor tweaks it was possible to load the python bindings and run a network context with the resulting dll. Three files had to be changed: network.c, iio-private.h, and iio.py. I attached them along with the steps in case they're useful to anyone.

 

I think the python changes might be worth picking up (check for platform and load .so or .dll as appropriate). The mingw changes were mostly to account for differences between mingw on windows and linux such as snprintf and error code availability. Could be picked up as-is, but they're not robust (ex. only handles ipv4 right now).

 

It'd be great to get some compiling for windows instructions on the wiki at some point (either natively or cross-compiling).

 

Thanks,

Adam

Attachments

Outcomes