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. Cross Compiler WiringPi with QT on Linux for RPi3
QtWS25 Last Chance

Cross Compiler WiringPi with QT on Linux for RPi3

Scheduled Pinned Locked Moved Unsolved QtonPi
2 Posts 2 Posters 1.4k 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.
  • H Offline
    H Offline
    Hiloshi
    wrote on last edited by Hiloshi
    #1

    Hi All,

    I want to cross compile WiringPi on QT Creator (ubuntu 16.04). I simply add WiringPi directory to header and source as below:
    Screen
    https://www.dropbox.com/s/s6nj9mu33tul6az/Screenshot from 2017-03-05 22-37-35.png
    Here are some information about this project:

    1. Before adding wiringPi, this project can build successful run on Rpi3.
    2. After adding wiringPi, it shows a lot error.
    3. I have not add any code to this project(such as "#include "../wiringpi.h").

    Any idea is very appreciate.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      stryga42
      wrote on last edited by
      #2

      Why would you like to cross-compile the WiringPi library? I guess the usual way is to compile WiringPi locally on the Pi, which is quite simple and fast. During cross-compile of your app you just need the header and an additional

      LIBS        += -lwiringPi
      

      in your pro file. (Assuming proper paths for the system directories of your pi are set in your cross compile environment.)

      Check, if you already have WiringPi binaries on your Pi. If yes, you should get something like

      pi@raspberrypi:~/deploy $ ldconfig -p | grep wiringPi
      	libwiringPiDev.so (libc6,hard-float) => /usr/local/lib/libwiringPiDev.so
      	libwiringPiDev.so (libc6,hard-float) => /usr/lib/libwiringPiDev.so
      	libwiringPi.so (libc6,hard-float) => /usr/local/lib/libwiringPi.so
      	libwiringPi.so (libc6,hard-float) => /usr/lib/libwiringPi.so
      
      

      Then make sure, that these libraries are also visible in the Pi root file system on your development machine.

      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