building_libiio_for_windows - ArrowElectronics/arrow-adi-intel-psg GitHub Wiki

Building libiio in Visual Studio

  • Libiio can be built using the CMake build system.
    Download CMake: http://www.cmake.org/download/

  • To build libiio under Windows, you will need the libxml2 DLL as well.
    Optionally, for USB support, you will need the libusb DLL; and for UART support, you will need the liberialport DLL.
    For convenience, a ZIP containing precompiled DLLs of those libraries can be downloaded here: http://swdownloads.analog.com/cse/build/libiio-win-deps.zip

  • Launch CMake, and specify the location of the source code and the directory where the build will occur.
    Enable the Grouped and Advanced options (optional).

  • Then click on Configure.
    CMake will ask you what generator to use for the project. Select Use default native compilers and the generator that matches your version of Visual Studio.

  • CMake will most likely throw an error, as the libxml2 library is not in the compiler's default search paths:
  • Set the correct paths to LIBXML2_INCLUDE_DIR, LIBXML2_LIBRARIES and LIBXML2_XMLLINT_EXECUTABLE as shown below. Then, click again on Configure; the errors should disappear.
  • Click on Generate.
    Now, CMake generated a Visual Studio solution file in the build directory, named iio.sln. You can open this file with Visual Studio to build the project.


Return to Libiio section


Information from this site was obtained from
⚠️ **GitHub.com Fallback** ⚠️