当前位置:网站首页>带wiringPi库在unbutu 编译 并且在树莓派运行
带wiringPi库在unbutu 编译 并且在树莓派运行
2022-08-01 01:21:00 【十年哞一剑】
demo1.c 传到unbutu

WringPi的包传到unbutu
首先 把WringPi的包传到 unbutu 上面
1 先在window 解压WringPi.rar 最后成为WringPi(文件夹)

ls -l
vi INSTALL 存有开发信息


运行 ./build 会产生软连接
存在 /usr/local/lib 底下
运行 ./build 查看 /usr/local/lib


确实有了 但是不能用
验证一下

还是报错
把 树莓派的libwiringPi.so 拿上来用


传到 unbutu

生成 软连接 ln 源文件 目标文件
1 先删除源文件
2 在生成软连接(软连接类似一种快捷方式 不占内存 )


编译 demo1.c
格式
arm-linux-gnueabihf-gcc demo1.c -I /home/yangchangyuan/LessonPi/WiringPi/wiringPi -L. -lwiringPi
arm平台的编译器 文件 链接文件路径 -L.在当前页面查找 -l可执行代码(也就是软连接)
生成a.out 可执行文件


树莓派运行

边栏推荐
- RTL8762DK WDG(六)
- Js replication
- Application of integrated stepper motor in UAV automatic airport
- gateway gateway cross domain
- leetcode: 1562. Find latest grouping of size M [simulation + endpoint record + range merge]
- Item 36: Specify std::launch::async if asynchronicity is essential.
- Rasa 3.x Learning Series - Using Lookup Tables to Improve Entity Extraction
- Fat interface in JQESAP system
- 考研备考方案
- OSF一分钟了解敏捷开发模式
猜你喜欢

RTL8762DK uses DebugAnalyzer (four)

Beijing suddenly announced that yuan universe big news

【Cryptography/Cryptanalysis】Cryptanalysis method based on TMTO

RTL8762DK Lighting/LED (3)

Application of integrated stepper motor in UAV automatic airport

北京突然宣布,元宇宙重大消息

欧拉系统(euleros):升级Mysql

RTL8762DK PWM(七)

ROS2系列知识(4): 理解【服务】的概念

Classes and Objects: Medium
随机推荐
TCP协议详解
软考高级系统架构设计师系列之:信息系统基础知识
MYSQL经典面试题
ROS2 series of knowledge (4): understand the concept of [service]
Academicians of the two academies speak bluntly: Don't be superstitious about academicians
IDEA修改注释字体
内核的解压缩过程详解
从设备树(dtb格式数据)中解析出bootargs
Solve the problem that when IDEA creates a new file by default, right-click, new, there is no XML file
设备树——dtb格式到struct device node结构体的转换
MYSQL查询截取优化分析
JQESAP系统里的胖接口Fat interface
Handwritten binary search tree and test
STK8321 I2C (Shengjia-accelerometer) example
date command
考研备考方案
Soft Exam Senior System Architect Series: Basic Knowledge of Information Systems
JS时间戳的意义是什么?知道sql会考虑加时间戳,JS的时间戳用于什么场景?
GDB 源码分析系列文章五:动态库延迟断点实现机制
RTL8762DK uses DebugAnalyzer (four)