WiringPi with ROS on Ubuntu

asked 2016-02-02 16:01:02 -0600

jack2502 gravatar image

updated 2016-02-03 01:17:34 -0600

Hi all,

I am developing a project running on a Raspberry Pi using WiringPi for GPIO, I2C, SPI etc. As I don't want to write my Program in the console, I have installed ROS and WiringPi on my Machine running Ubuntu and am using QtCreator to write my code. Obviously it will not be able to run the program, but I would like to compile it to check for mistakes, and then re-compile and run it on my Raspberry Pi. While I have managed to get it to work on a virtual machine running Ubuntu a while ago (no idea how though), I cant get it to work on my current setup (both are running Ubuntu 14.04). On the virtual machine it could not find pthread, but at least it compiled fine. Now, when I try to compile (either directly in QtCreator or via catkin_make) I get the following error:

CMakeLists.txt:18: error: By not providing "FindWiringPi.cmake" in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by "WiringPi", but CMake did not find one. Could not find a package configuration file provided by "WiringPi" with any of the following names: WiringPiConfig.cmake wiringpi-config.cmake Add the installation prefix of "WiringPi" to CMAKE_PREFIX_PATH or set "WiringPi_DIR" to a directory containing one of the above files. If "WiringPi" provides a separate development package or SDK, be sure it has been installed.

This happens when I add find_package(WiringPi REQUIRED), otherwise it obviously tells me that the functions used (from wiringPi) are not defined. I have tried adding

set(CMAKE_PREFIX_PATH /usr/local/lib/)


set(WIRINGPILIBRARYDIRS /usr/local/lib).

, but still the same

edit retag flag offensive close merge delete


I am in the exact same case, how can you compile with wiringpi on ubuntu ? thx

Dben gravatar image Dben  ( 2016-04-21 07:54:16 -0600 )edit