简体   繁体   English

用于ARM设备的交叉编译库

[英]Cross-compiling libraries for ARM device

I am experiencing some difficulties in deploying a sample application which uses Qt libraries to an ARM device. 在将使用Qt库的示例应用程序部署到ARM设备时,我遇到了一些困难。 I compiled the libraries using the cross-compiler provided for my system, I copied the binaries to the device and I compiled with the same compiler a sample appliction. 我使用为系统提供的交叉编译器来编译库,将二进制文件复制到设备,并使用相同的编译器编译了示例应用程序。 When I try to start it this is what I get; 当我尝试启动它时,这就是我得到的;

/usr/lib/libstdc++.so.6: version `CXXABI_ARM_1.3.3' not found (required by ./libQtNetwork.so.4) /usr/lib/libstdc++.so.6:找不到版本“ CXXABI_ARM_1.3.3”(./ libQtNetwork.so.4必需)

/usr/lib/libstdc++.so.6: version `CXXABI_ARM_1.3.3' not found (required by ./libQtCore.so.4) /usr/lib/libstdc++.so.6:找不到版本“ CXXABI_ARM_1.3.3”(./ libQtCore.so.4必需)

What could be causing this? 是什么原因造成的? I used the toolchain provided by the manufacturer, so it should be ok... Is it possible that the compiler is correct but it is linking not to the libstc++ it is provided with but with the libstdc++ I have in my system, following the link path? 我使用了制造商提供的工具链,所以应该没问题...编译器是否正确,但是它不是链接到它提供的libstc ++,而是链接到我系统中的libstdc ++,并遵循该链接路径? Thanks! 谢谢!

As far as I can see, the first comment to my question was exactly the solution. 据我所知,对我的问题的第一个评论就是解决方案。 The version of the library was the same but was not compatible. 该库的版本相同,但不兼容。 I moved that library to the device and everything worked. 我将该库移至设备,一切正常。

From my experience, I have a FriendlyARM that was shipped with a GCC toolchain. 根据我的经验,我有一个随GCC工具链一起提供的FriendlyARM。 To generate correct code I need to specify by hand -mcpu , -mfp , -mabi and -mabi-float . 要生成正确的代码,我需要手动指定-mcpu-mfp-mabi-mabi-float

If you build your own GCC you may set the defaults, but at least in my devkit, they came with the wrong defaults. 如果您构建自己的GCC,则可以设置默认值,但是至少在我的devkit中,它们带有错误的默认值。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM