问题:
error: ‘ioctl’ was not declared in this scope
35 | ioctl(fd, TCGETS2, &tty);
解决:
打开Cheetah-Software-master/robot/src/rt/rt_serial.cpp
把
#define termios asmtermios
#include <asm/termios.h>
#undef termios
#include <termios.h>
#include <math.h>
#include <pthread.h>
#include <stropts.h>
#include <endian.h>
#include <stdint.h>
改成
#define termios asmtermios
//#include <asm/termios.h>
#include<asm/ioctls.h>
#include<asm/termbits.h>
#undef termios
#include<sys/ioctl.h>
#include <termios.h>
#include <math.h>
#include <pthread.h>
#include <stropts.h>
#include <endian.h>
#include <stdint.h>
感谢王书涵师兄提供的解决方案
(王博士单身,阳光开朗,有意者可留言评论区)