c++ - 在arm-linux-gnueabihf-g++交叉编译期间出错。无法识别共享库文件

标签 c++ compiler-errors g++ shared-libraries cross-compiling

我正在尝试使用https://www.acmesystems.it/arm9_toolchain从此处使用ARM交叉编译器工具链交叉编译64位体系结构ARM设备的C++代码。

我的编译命令是

arm-linux-gnueabihf-gcc examples/neon_cartoon_effect.cpp utils/Utils.cpp -I. -Iinclude -std=c++11 -mfpu=neon -L/home/deeptihegde/ComputeLibrary/build  -larm_compute -o build/neon_cartoon_effect

我收到以下错误
/home/deeptihegde/ComputeLibrary/build/libarm_compute.so: file not recognized: File format not recognized
collect2: error: ld returned 1 exit status


这是编译器问题吗?我链接不正确吗?
任何帮助,将不胜感激,谢谢。

最佳答案

我认为问题是您正在尝试将32位应用程序(neon_cartoon_effect)与64位库(libarm_compute.so)链接。

关于c++ - 在arm-linux-gnueabihf-g++交叉编译期间出错。无法识别共享库文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54090916/

相关文章:

c++ - 如何在桌面上使用 QtMultimediaKit?

c++ - 如果编译后的源代码特定于编译时所使用的硬件,我们该如何分发?

compiler-errors - 将 php5 扩展移植到 php7 并且缺少 MAKE_STD_ZVAL

c++ - 函数 undefined reference C++

c++ - Valgrind: "Invalid read"与 c_str 和 strtod

c++ - 对 'WinMain' 的 undefined reference ,SDL 在 native 环境中编译

c++ - 无法将 'int (*)[size]' 转换为 'int**'

c++ - 在 Arduino IDE 中使用正则表达式库时未定义对 `longjmp' 的引用

g++ - 将 FLTK 与 g++ 链接

C++ make_shared 不可用