[Solved] Using WiringPi for Cross Compliation

  • All,

    Has anyone been able to use the wiringPi.h library in their Qt project without having to compile the project on the Raspberry PI itself (ie, cross compiling the program)? I have the libraries installed on the Raspberry Pi, and I have an image of the Raspberry Pi system with wiringPi.h mounted on my system, but when I compile I get the message:

    wiringPi.h: No such file or directory

    Any assistance is greatly appreciated.

  • Thanks for the heads up. I ended up solving the issue though by finding this forum: http://www.raspberrypi.org/phpBB3/viewtopic.php?t=33881&p=289337

    My issue was I didn't have the the following in my .pro file

    INCLUDEPATH += /mnt/rasp-pi-rootfs/usr/local/include
    LIBS += -L/mnt/rasp-pi-rootfs/usr/local/lib -lwiringPi

  • Just small note which can be useful for someone.
    I believe that /mnt/rasp-pi-rootfs/ is path to system root of Raspberry Pi mounted to your system.
    To avoid this hard code it would be better to use:
    INCLUDEPATH += $$[QT_SYSROOT]/usr/local/include
    LIBS += -L$$[QT_SYSROOT]/usr/local/lib -lwiringPi
    In this case even if you mounted Raspberry Pi's root file system to other point it will work correctly.

Log in to reply

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.