c++ - 将libpcap添加到mipsel时交叉编译出错

标签 c++ linux gcc cross-compiling openwrt

我编译了C并链接了libpcap 添加库后。我使用以下行来编译我的代码。

mipsel-openwrt-linux-gcc -c -Wall -I /home/osboxes/Downloads/OpenWrt-SDK-brcm47xx-for-Linux-i686-gcc-4.3.3+cs_uClibc-0.9.30.1/staging_dir/toolchai,n-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/include -o sniffex.o sniffex.c

输出:

cc1: error: /home/osboxes/Downloads/OpenWrt-SDK-brcm47xx-for-Linux-i686-gcc-4.3.3+cs_uClibc-0.9.30.1/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/bin/../lib/gcc/mipsel-openwrt-linux-uclibc/4.3.3/../../../../mipsel-openwrt-linux-uclibc/sys-include: not a directory
cc1: error: /home/osboxes/Downloads/OpenWrt-SDK-brcm47xx-for-Linux-i686-gcc-4.3.3+cs_uClibc-0.9.30.1/staging_dir/toolchain-mipsel_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/bin/../lib/gcc/../../lib/gcc/mipsel-openwrt-linux-uclibc/4.3.3/../../../../mipsel-openwrt-linux-uclibc/sys-include: not a directory

我也尝试用 Makefile 来做到这一点

最佳答案

我做错了什么。我发现 SDK 是 32 位,而我有 64 位操作系统,然后我下载了 64 位 SDK,一切正常。

关于c++ - 将libpcap添加到mipsel时交叉编译出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39132266/

相关文章:

C++ 结合静态和动态多态性来创建 "Hyper Polymorphism"?

c++ - 具有 'this' 指针的类的大小

mysql - TeamSpeak3 服务器迁移

android - 无法打开与身份验证代理 opensuse 13.2 的连接

c++ - 策略模式是否允许状态?

c++ - 参数包构造函数在类模板中隐藏用户定义的转换

linux - 如何在 netcdf 文件中将固定大小的维度转换为无限大小

apache - Ubuntu - 安装 ScyllaDB - 缺少可选包 libsystemd(或 libsystemd-daemon) - GCC 版本错误。 Scylla 需要 GCC >= 7.3 才能编译

C++ 编译器在封装行为上存在分歧——哪一个做对了?

c - 尝试在 SublimeText 3 中使用 C 时出错(gcc 未被识别为内部或外部命令)