ubuntu交叉编译x264报错:‘X264_VERSION’ undeclared

ubuntu交叉编译x264报错:‘X264_VERSION’ undeclared

检查version.sh文件权限,可以直接输入以下命令修改权限

nvidia@miivii-tegra:~/Desktop/Tianc/x264$ chmod 777 version.sh

然后重新编译即可

nvidia@miivii-tegra:~/Desktop/Tianc/x264$ ./configure && make -j16
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
由于 `USBDEVFS_URB_NO_TRANSFER_DMA_MAP` 常量是在 Linux 5.3 内核中引入的,而您使用的是 Linux 5.1 内核,因此该常量未被定义,导致编译错误。 您可以尝试使用 `USBDEVFS_URB_SHORT_NOT_OK` 常量代替 `USBDEVFS_URB_NO_TRANSFER_DMA_MAP` 常量,修改示例代码如下: ```c #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include <unistd.h> #include <errno.h> #include <string.h> #include <linux/usbdevice_fs.h> #include <linux/input.h> #define VENDOR_ID 0x1234 #define PRODUCT_ID 0x5678 int main(int argc, char** argv) { int fd; char dev_name[20]; struct usbdevfs_urb urb; unsigned char buf[8]; if(argc != 2) { printf("Usage: %s <device>\n", argv[0]); return 1; } sprintf(dev_name, "/dev/bus/usb/%s", argv[1]); fd = open(dev_name, O_RDWR); if(fd == -1) { perror("open"); return 1; } memset(&urb, 0, sizeof(struct usbdevfs_urb)); urb.type = USBDEVFS_URB_TYPE_INTERRUPT; urb.endpoint = 0x81; urb.flags = USBDEVFS_URB_SHORT_NOT_OK; urb.buffer = buf; urb.buffer_length = sizeof(buf); urb.usercontext = NULL; if(ioctl(fd, USBDEVFS_SUBMITURB, &urb) < 0) { perror("ioctl"); return 1; } while(1) { if(read(fd, &urb, sizeof(struct usbdevfs_urb)) < sizeof(struct usbdevfs_urb)) { perror("read"); return 1; } if(urb.status != 0) { perror("urb"); return 1; } printf("Data: %02x %02x %02x %02x %02x %02x %02x %02x\n", buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6], buf[7]); } close(fd); return 0; } ``` 在上述示例代码中,将 `USBDEVFS_URB_NO_TRANSFER_DMA_MAP` 常量修改为 `USBDEVFS_URB_SHORT_NOT_OK` 常量,即可避免编译错误。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值