我试图在Jetson Tx2上使用C++ ARM 32位库,这是一个ARM 64位Linux机器。当我尝试编译一些库提供我得到以下编译错误的示例代码:在64位linux armv8机器上编译32位二进制时遇到问题
/usr/bin/ld: skipping incompatible /home/nvidia/libroyale/bin/libroyale.so
when searching for -lroyale
/usr/bin/ld: cannot find -lroyale
collect2: error: ld returned 1 exit status
CMakeFiles/sampleCameraInfo.dir/build.make:94: recipe for target
'sampleCameraInfo' failed
make[2]: *** [sampleCameraInfo] Error 1
CMakeFiles/Makefile2:67: recipe for target
'CMakeFiles/sampleCameraInfo.dir/all' failed
make[1]: *** [CMakeFiles/sampleCameraInfo.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
我认为这个错误是因为32位库与一个64位的机器不知何故不兼容。
我一直在浏览其他有关类似问题的StackOverflow论坛,根据这些论坛的建议,我在编译时向CXXFLAGS和LDFLAGS添加了-m32标志。然而,我则得到以下错误:
g+