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


树莓派运行

边栏推荐
- leetcode:1562. 查找大小为 M 的最新分组【模拟 + 端点记录 + 范围合并】
- 元宇宙改变人类工作模式的四种方式
- ROS2系列知识(4): 理解【服务】的概念
- Handwritten binary search tree and test
- 值传递还是引用传递(By Value or By Reference)
- Google "Cloud Developer Quick Checklist"; Tsinghua 3D Human Body Dataset; SenseTime "Universal Vision Framework" open class; Web3 Minimalist Getting Started Guide; Free Books for Efficient Deep Learni
- Key Points Estimation and Point Instance
- how to edit the table of contents of an epub ebook
- OSD read SAP CRM One Order application log way of optimization
- WebApi hits an Attribute to handle exceptions uniformly
猜你喜欢

MYSQL逻辑架构

STK8321 I2C (Shengjia-accelerometer) example

ECCV2022 Workshop | Multi-Object Tracking and Segmentation in Complex Environments

RTL8762DK PWM(七)

机器学习应该如何入门?

How is the tree structure of the device tree reflected?

MYSQL主从复制

Modern Enterprise Architecture Framework 1

MYSQL索引解析

MYSQL master-slave replication
随机推荐
Modern Enterprise Architecture Framework 1
你需要知道的 TCP 四次挥手
Exam preparation plan
MYSQL索引解析
机器学习应该如何入门?
Academicians of the two academies speak bluntly: Don't be superstitious about academicians
【 】 today in history: on July 31, "brains in vats" the birth of the participant;The father of wi-fi was born;USB 3.1 standard
解决安装MySQL后,Excel打开很慢的问题
Flink 部署和提交job
Cmake introductory study notes
Rasa 3.x 学习系列- Rasa - Issues 4898 学习笔记
RTL8762DK RTC (5)
mySql data view
Introduction to the decision logic of WAASAP WebClient UI page labels
IDEA修改注释字体
High dimensional Gaussian distribution basics
Summary of JVM interview questions (continuously updated)
Luogu P3373: Segment tree
Rasa 3.x 学习系列- Rasa - Issues 4918 学习笔记
Chinese version of Pylint inspection rules