【问题标题】:How do I #include <termios.h> in the Arduino Software (1.6.5)?如何在 Arduino 软件 (1.6.5) 中#include <termios.h>?
【发布时间】:2015-06-24 23:31:00
【问题描述】:

所以这就是现在正在发生的事情,我正在使用来自 URG 激光传感器的代码,并且我正在尝试在 Arduino 软件中对其进行编译以查看是否可以对其进行测试。但是,当我单击“编译”时,会显示此错误消息:

In file included from /home/hadoop/sketchbook/libraries/urg/urg_connection.h:17:0,
                 from /home/hadoop/sketchbook/libraries/urg/urg_sensor.h:15,
                 from Laser_hpp.ino:4:
/home/hadoop/sketchbook/libraries/urg/urg_serial.h:22:21: fatal error: termios.h: No such file or directory
 #include <termios.h>
                     ^
compilation terminated.

我下载了我为 Ubuntu Linux 找到的所有 termios 库,但它仍然给我错误。我找到的库已复制到 urg_sensor.h 文件所在的位置,但效果不佳。

我尝试通过以下命令安装:sudo apt-get install libc6 或 libc6-dev(用于 linux 的 termios 库),但它们已经在最新版本上。

所以,我不知道还能做什么。如果有人对我现在应该做什么有任何想法或想法,我真的很感激。

谢谢!

【问题讨论】:

  • 你能在你的文件系统上找到termios.h吗?应该在包含目录中。如果找不到,请运行find -name "termios.h"

标签: c linux arduino termios


【解决方案1】:

termios.h 在 AVR Libc 中不可用。您需要先将代码从 Linux 移植到 Arduino 平台,然后才能尝试编译。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多