WiringPi with ROS on Ubuntu
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 CMAKEMODULEPATH 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 CMAKEPREFIXPATH 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(CMAKEPREFIXPATH /usr/local/lib/)
or
set(WIRINGPILIBRARYDIRS /usr/local/lib).
, but still the same
Asked by jack2502 on 2016-02-02 17:01:02 UTC
Comments
I am in the exact same case, how can you compile with wiringpi on ubuntu ? thx
Asked by Dben on 2016-04-21 07:54:16 UTC