How to configure iotdk-ide (Eclipse) to use iotkit-comm libraries

Version 4

    1. Create a new Intel(R) IoT C/C++ Project on Eclipse, specify the location of the project folder by removing the check on the Use default location box and using the folder where the Eclipse is installed. Click on Next and complete the boxes for Connection Name and Target Name with the IP address of the board.

    Note: For this document, the location for the project named iotkit-comm used was the one where the Eclipse folders are located. C:\Intel\iotdk-ide-win\workspace\Project_Name

    new.JPG

    2. Create a folder to place the iotkit-comm include and library files in the project's folder.

    C:\Intel\iotdk-ide-win\workspace\iotkit-comm\include

    C:\Intel\iotdk-ide-win\workspace\iotkit-comm\lib

    folders.JPG

     

    3. Open a Terminal Session on the Edison and copy the following files in C:\Intel\iotdk-ide-win\workspace\iotkit-comm\include

    /usr/include/iokit-comm/cJSON.h

    /usr/include/iokit-comm/iotkit-comm.h

    /usr/include/iokit-comm/iotkit-comm_mdns.h

    /usr/include/iokit-comm/util.h

     

    4. Copy the file /usr/lib/libiotkit-comm.so (from the Edison) in C:\Intel\iotdk-ide-win\workspace\iotkit-comm\lib

     

    5. On Eclipse, right click on the project name and select Properties, go to C/C++ Build > Settings > Cross GCC Compiler. Select Includes > Add > File System... to browse for the include folder that was created before and click Apply

    cross Gcc.JPG

     

    include.JPG

    It should look like:

    includeOK.JPG6. Go to C/C++ Build > Settings > Cross GCC Linker select Libraries > Add from the lower Libraries section, select File System... to browse for the lib folder that was created before and click Apply

    lib.JPGIt should look like:

     

    libOK.JPG

    7. Go to C/C++ Build > Settings > Cross GCC Linker select Miscellaneous and add -liotkit-comm -ldns_sd -ldl -lm on the Linker Flags, then click Apply and OK

    MISc.JPG

    8. Rebuilt your project in Project > C/C++ Index > Rebuild

     

    Note: This process may require to restart the Eclipse IDE