0

阿木币

0

精华

24 小时

在线时间

老司机

Rank: 2

发表于 2020-6-24 11:57:04 3709 浏览 8 回复

编译include出错

为什么总是编译的时候总是提示#include<px4_app.h>出错,No such file or directory,明明别的文件可以,自己写的却不行,需要添加什么东西吗。
编译错误提示如下
/src/examples/r_uart/r_uart.c:17:10: fatal error: px4_app.h: No such file or directory
#include <px4_app.h>
          ^~~~~~~~~~~
compilation terminated.


源代码include如下
#include <stdio.h>
#include <termios.h>
#include <unistd.h>
#include <stdbool.h>
#include <errno.h>
#include <drivers/drv_hrt.h>
#include <uORB/topics/llyyff.h>
#include <uORB/uORB.h>
#include <string.h>
#include <systemlib/err.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <px4_platform_common/log.h>
#include <px4_log.h>
#include <px4_app.h>
#include <px4_tasks.h>







风帆已获得悬赏 1 阿木币

最佳答案

包含文件都没有的话,查查那个文件是否存在啊~~~

扫一扫浏览分享
回复

使用道具 举报

0

阿木币

0

精华

182 小时

在线时间

技术大V

Rank: 4

发表于 2020-6-24 12:22:25
你把整个工程上传到百度云,给个链接把....
回复 点赞 1

使用道具 举报

114

阿木币

0

精华

142 小时

在线时间

技术大V

Rank: 4

发表于 2020-6-24 12:17:37
包含文件都没有的话,查查那个文件是否存在啊~~~
回复 点赞

使用道具 举报

0

阿木币

0

精华

24 小时

在线时间

老司机

Rank: 2

 楼主| 发表于 2020-6-24 13:11:14
chasing 发表于 2020-6-24 12:22
你把整个工程上传到百度云,给个链接把....

链接: https://pan.baidu.com/s/1F0d1rqlkY5i0EAR-1c3qhQ 提取码: 7fnd

src/example/里面的r_uart就是上面编译会错误的地方。这个目的就是用串口读取机载计算机的数据
回复 点赞

使用道具 举报

0

阿木币

0

精华

24 小时

在线时间

老司机

Rank: 2

 楼主| 发表于 2020-6-24 13:11:48
chasing 发表于 2020-6-24 12:22
你把整个工程上传到百度云,给个链接把....

谢谢{:4_113:}
回复 点赞

使用道具 举报

0

阿木币

0

精华

24 小时

在线时间

老司机

Rank: 2

 楼主| 发表于 2020-6-24 13:54:11
chasing 发表于 2020-6-24 12:22
你把整个工程上传到百度云,给个链接把....

链接:https://pan.baidu.com/s/1J9t3jsK9h4zdPQpxYENg8Q
提取码:txj3


这个是只有r_uart,比较小,下载方便
回复 点赞

使用道具 举报

114

阿木币

0

精华

142 小时

在线时间

技术大V

Rank: 4

发表于 2020-6-24 14:07:07
chasing 发表于 2020-6-24 12:22
你把整个工程上传到百度云,给个链接把....

厉害了~~~
回复 点赞

使用道具 举报

0

阿木币

0

精华

24 小时

在线时间

老司机

Rank: 2

 楼主| 发表于 2020-6-24 19:24:47
SmilE 发表于 2020-6-24 12:17
包含文件都没有的话,查查那个文件是否存在啊~~~

别的程序都可以include怎么可能不存在呢?就自己写的不行
回复 点赞

使用道具 举报

0

阿木币

0

精华

24 小时

在线时间

老司机

Rank: 2

 楼主| 发表于 2020-6-27 15:51:34
fyl123456 发表于 2020-6-24 19:24
别的程序都可以include怎么可能不存在呢?就自己写的不行

找到错误,已经解决
回复 点赞

使用道具 举报

返回列表
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表