当前位置:网站首页>带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 可执行文件


树莓派运行

边栏推荐
- Soft Exam Senior System Architect Series: Basic Knowledge of Information Systems
- RTL8762DK WDG(六)
- 七月集训(第31天) —— 状态压缩
- 两院院士直言:不要迷信院士
- Fat interface in JQESAP system
- MYSQL Keyword Explain Analysis
- 欧拉系统(euleros):升级Mysql
- mySql data view
- Flink deploys and submits jobs
- Item 36: Specify std::launch::async if asynchronicity is essential.
猜你喜欢

RTL8762DK uses DebugAnalyzer (four)

元宇宙改变人类工作模式的四种方式

ECCV2022 Workshop | 复杂环境中的多目标跟踪和分割

STK8321 I2C(昇佳-加速度传感器)示例

Academicians of the two academies speak bluntly: Don't be superstitious about academicians

Beijing suddenly announced that yuan universe big news

leetcode:1562. 查找大小为 M 的最新分组【模拟 + 端点记录 + 范围合并】

LeetCode每日一练 —— 环形链表问题(面试四连问)

MYSQL query interception optimization analysis

你需要知道的 TCP 四次挥手
随机推荐
High dimensional Gaussian distribution basics
高维高斯分布基础
MYSQL master-slave replication
Rasa 3.x 学习系列-使用查找表改进实体提取
gateway gateway cross domain
Chinese version of Pylint inspection rules
Application of integrated stepper motor in UAV automatic airport
Solve the problem that when IDEA creates a new file by default, right-click, new, there is no XML file
机器学习初学者可以学哪些实战项目?
元宇宙改变人类工作模式的四种方式
cmake入门学习笔记
JS时间戳的意义是什么?知道sql会考虑加时间戳,JS的时间戳用于什么场景?
从零造键盘的键盘超级喜欢,IT人最爱
WebApi hits an Attribute to handle exceptions uniformly
How to get started with YOLO?How to implement your own training set?
How is the tree structure of the device tree reflected?
Introduction to machine learning how to?
修改Postman安装路径
两院院士直言:不要迷信院士
Luogu P3373: Segment tree