QiYin
November 14, 2022, 2:07am
1
Which Khadas SBC do you use?
**VIM3**
Which system do you use? Android, Ubuntu, OOWOW or others?
**Ubuntu**
Which version of system do you use? Khadas official images, self built images, or others?
** Khadas official images**
Please describe your issue below:
**我在使用C++对ROS应用程序进行开发的过程中希望使用wiringPi库,因此需要将wiringPi库的位置写在CMakeList.txt文件中。我尝试了/usr/local/include这个目录,但是编译并没有通过。 在CMakeList.txt文件中我是这样写的: FIND_LIBRARY(WIRINGPI_LIBRARY wiringPi /usr/local/include) 括号内第一个是自己起的名字,第二个是库的名字,第三个是库的位置。 **
Post a console log of your issue below:
**
-- Could NOT find wiringPi (missing: wiringPi_DIR)
-- Could not find the required component 'wiringPi'. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found.
CMake Error at /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
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.
Call Stack (most recent call first):
gripper/CMakeLists.txt:12 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/khadas/ros_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/khadas/ros_ws/build/CMakeFiles/CMakeError.log".
**
Frank
November 14, 2022, 2:43am
2
@QiYin
yan@yan-wyb:~/yan/code/khadas/fenix/packages/wiringpi_debs/focal/arm64$ dpkg -c wiringpi_3.14-2_arm64.deb
drwxrwxr-x root/root 0 2022-10-24 20:26 ./
drwxr-xr-x root/root 0 2022-10-24 20:26 ./usr/
drwxr-xr-x root/root 0 2022-10-24 20:26 ./usr/local/
drwxr-xr-x root/root 0 2022-10-24 20:26 ./usr/local/bin/
-rwxr-xr-x root/root 55016 2022-10-24 20:26 ./usr/local/bin/gpio
drwxr-xr-x root/root 0 2022-10-24 20:26 ./usr/local/include/
-rw-r--r-- root/root 1604 2022-10-24 20:26 ./usr/local/include/ads1115.h
-rw-r--r-- root/root 1176 2022-10-24 20:26 ./usr/local/include/bmp180.h
-rw-r--r-- root/root 1364 2022-10-24 20:26 ./usr/local/include/drcNet.h
-rw-r--r-- root/root 1228 2022-10-24 20:26 ./usr/local/include/drcSerial.h
-rw-r--r-- root/root 1673 2022-10-24 20:26 ./usr/local/include/ds1302.h
-rw-r--r-- root/root 1200 2022-10-24 20:26 ./usr/local/include/ds18b20.h
-rw-r--r-- root/root 1484 2022-10-24 20:26 ./usr/local/include/gertboard.h
-rw-r--r-- root/root 1176 2022-10-24 20:26 ./usr/local/include/htu21d.h
-rw-r--r-- root/root 2274 2022-10-24 20:26 ./usr/local/include/khadas_edge.h
-rw-r--r-- root/root 2562 2022-10-24 20:26 ./usr/local/include/khadas_vim1.h
-rw-r--r-- root/root 5451 2022-10-24 20:26 ./usr/local/include/khadas_vim1s.h
-rw-r--r-- root/root 2474 2022-10-24 20:26 ./usr/local/include/khadas_vim2.h
-rw-r--r-- root/root 3489 2022-10-24 20:26 ./usr/local/include/khadas_vim3.h
-rw-r--r-- root/root 3529 2022-10-24 20:26 ./usr/local/include/khadas_vim3m.h
-rw-r--r-- root/root 7134 2022-10-24 20:26 ./usr/local/include/khadas_vim4.h
-rw-r--r-- root/root 2095 2022-10-24 20:26 ./usr/local/include/lcd.h
-rw-r--r-- root/root 2077 2022-10-24 20:26 ./usr/local/include/lcd128x64.h
-rw-r--r-- root/root 1181 2022-10-24 20:26 ./usr/local/include/max31855.h
-rw-r--r-- root/root 1186 2022-10-24 20:26 ./usr/local/include/max5322.h
-rw-r--r-- root/root 1266 2022-10-24 20:26 ./usr/local/include/maxdetect.h
-rw-r--r-- root/root 1185 2022-10-24 20:26 ./usr/local/include/mcp23008.h
-rw-r--r-- root/root 1188 2022-10-24 20:26 ./usr/local/include/mcp23016.h
-rw-r--r-- root/root 1545 2022-10-24 20:26 ./usr/local/include/mcp23016reg.h
-rw-r--r-- root/root 1185 2022-10-24 20:26 ./usr/local/include/mcp23017.h
-rw-r--r-- root/root 1199 2022-10-24 20:26 ./usr/local/include/mcp23s08.h
-rw-r--r-- root/root 1181 2022-10-24 20:26 ./usr/local/include/mcp23s17.h
-rw-r--r-- root/root 2026 2022-10-24 20:26 ./usr/local/include/mcp23x08.h
-rw-r--r-- root/root 2588 2022-10-24 20:26 ./usr/local/include/mcp23x0817.h
-rw-r--r-- root/root 1186 2022-10-24 20:26 ./usr/local/include/mcp3002.h
-rw-r--r-- root/root 1186 2022-10-24 20:26 ./usr/local/include/mcp3004.h
-rw-r--r-- root/root 1355 2022-10-24 20:26 ./usr/local/include/mcp3422.h
-rw-r--r-- root/root 1186 2022-10-24 20:26 ./usr/local/include/mcp4802.h
-rw-r--r-- root/root 1184 2022-10-24 20:26 ./usr/local/include/pcf8574.h
-rw-r--r-- root/root 1191 2022-10-24 20:26 ./usr/local/include/pcf8591.h
-rw-r--r-- root/root 1161 2022-10-24 20:26 ./usr/local/include/piFace.h
-rw-r--r-- root/root 1486 2022-10-24 20:26 ./usr/local/include/piGlow.h
-rw-r--r-- root/root 1446 2022-10-24 20:26 ./usr/local/include/piNes.h
-rw-r--r-- root/root 1143 2022-10-24 20:26 ./usr/local/include/pseudoPins.h
-rw-r--r-- root/root 1115 2022-10-24 20:26 ./usr/local/include/rht03.h
-rw-r--r-- root/root 1778 2022-10-24 20:26 ./usr/local/include/scrollPhat.h
-rw-r--r-- root/root 1157 2022-10-24 20:26 ./usr/local/include/sn3218.h
-rw-r--r-- root/root 1250 2022-10-24 20:26 ./usr/local/include/softPwm.h
-rw-r--r-- root/root 1283 2022-10-24 20:26 ./usr/local/include/softServo.h
-rw-r--r-- root/root 1428 2022-10-24 20:26 ./usr/local/include/softTone.h
-rw-r--r-- root/root 1230 2022-10-24 20:26 ./usr/local/include/sr595.h
-rw-r--r-- root/root 9424 2022-10-24 20:26 ./usr/local/include/wiringPi.h
-rw-r--r-- root/root 1579 2022-10-24 20:26 ./usr/local/include/wiringPiI2C.h
-rw-r--r-- root/root 1427 2022-10-24 20:26 ./usr/local/include/wiringPiSPI.h
-rw-r--r-- root/root 1496 2022-10-24 20:26 ./usr/local/include/wiringSerial.h
-rw-r--r-- root/root 1367 2022-10-24 20:26 ./usr/local/include/wiringShift.h
-rw-r--r-- root/root 1189 2022-10-24 20:26 ./usr/local/include/wpiExtensions.h
drwxr-xr-x root/root 0 2022-10-24 20:26 ./usr/local/lib/
-rwxr-xr-x root/root 134312 2022-10-24 20:26 ./usr/local/lib/libwiringPi.so.3.14
-rwxr-xr-x root/root 37288 2022-10-24 20:26 ./usr/local/lib/libwiringPiDev.so.3.14
drwxr-xr-x root/root 0 2022-10-24 20:26 ./usr/share/
drwxr-xr-x root/root 0 2022-10-24 20:26 ./usr/share/man/
drwxr-xr-x root/root 0 2022-10-24 20:26 ./usr/share/man/man1/
-rw-r--r-- root/root 9414 2022-10-24 20:26 ./usr/share/man/man1/gpio.1
lrwxrwxrwx root/root 0 2022-10-24 20:26 ./usr/local/lib/libwiringPi.so -> libwiringPi.so.3.14
lrwxrwxrwx root/root 0 2022-10-24 20:26 ./usr/local/lib/libwiringPiDev.so -> libwiringPiDev.so.3.14
你可以参考下,这是WiringPi包的结构。