Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. QtonPi
  4. [Solved] Using WiringPi for Cross Compliation
QtWS25 Last Chance

[Solved] Using WiringPi for Cross Compliation

Scheduled Pinned Locked Moved QtonPi
3 Posts 2 Posters 9.5k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    CharlesKW
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • C Offline
      C Offline
      CharlesKW
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • D Offline
        D Offline
        DmAxy
        wrote on last edited by DmAxy
        #3

        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.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved