Cross compilation summary Libosscore.a LIBCURL.A LIBMYSQLCLIENT.A

Source: Internet
Author: User

It took a lot of effort to cross-compile the project files and run them on arm. First encountered the error is X uses VFP register arguments, B does not Baidu a bit, found to be hard floating point and soft floating point problem, the original idea is to change the encoding of X, to accommodate in Y, then how to do not, change the way of thinking, Use the Armv7-linux compiler to reload several libraries.  1.libosscore.a Download Oss-master.zip This library is compiled with CMake, mkdir build   ensure cmake out files and original files differentiate open CD Buildexport path=/home /slk/stm/stlinux-2.4/devkit/armv7/arm-cortex-linux-gnueabi/bin: $PATH   make CMake file search for gcc, find the gcccmake in ARMv7. make  compilation completed, the LIBOSSCORE.A copied to the project, compiled, appeared relocation r_x86_64_32 against ' a local symbol ' can is used when making a share D object; Recompile with-fpic error, when generating Libosscore.a, the-fpic parameter is not used, so modify Ossc-master file under CMakeLists.txt root       put     SET (cmake_c_flags "-std=c99-wall"     cache    STRING "FLAGS used by the compile R during all build types. " Force)     change to     SET (cmake_c_flags "-std=c99-wall-fpic"     cache    STRING "FLAGS Used by the compiler during all build types. " Force) CMake and make after deleting the CMakeCache.txt in the build. Fix  2.LIBCU.RL.A Download curl-7.42.1.tar.gz This library is configure compiled with the same export path=/home/slk/stm/stlinux-2.4/devkit/armv7/ Arm-cortex-linux-gnueabi/bin: $PATH, so you don't have to set cc for configure. Generated after the same because no-fpic caused by the problem, so modify all makefile files, Cfalgs after-fpic fix  3. LIBMYSQLCLIENT.A Download mysql-connector-c-6.1.6-src.tar.gz This library is compiled with CMake, so all the steps with the compilation libosscore.a, but you can save the modification CMakeLists.txt one step. When make to 88%, occurs/bin/sh:./comp_err, unable to execute binary file   error so, Unzip a copy of Mysql-connector-c-6.1.6-src, with the Linux under the GCC to compile, after the successful compilation, the Comp_err copy to cross-compile the corresponding folder, continue make, success. Get.

Cross-compilation summary libosscore.a LIBCURL.A LIBMYSQLCLIENT.A

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.