Cross-compilation summary libosscore. a libcurl. a libmysqlclient. a, libcurl cross-Compilation
It took a lot of effort to cross-compile the project files to run on arm. The first error was X uses VFP register arguments, B does not Baidu. It was found that it was a hard floating point and soft floating point problem. The original idea was to change the X encoding method, moved to Y, then how to get it all can't, change the idea, re-compile several libraries with the armv7-linux compiler. 1.libosscore.adownload oss-master.zip, which is compiled with cmake, mkdir build ensures that cmake files are separated from the original files cd buildexport PATH =/home/slk/STM/STLinux-2.4/devkit/armv7/arm-cortex-linux-gnueabi/bin: $ PATH: Find gcccmake in armv7 when the cmake file looks for gcc .. make is compiled, and libosscore. a is copied to the project, compiled, and the relocation R_X86_64_32 against 'a local symplot' can not be used when making a shared object; recompile with-fPIC error occurs. The libosscore is generated. the-fPIC parameter is not used in a. Therefore, modify O SET (CMAKE_C_FLAGS "-std = c99-Wall" cache string "Flags used by the compiler during all build types. "FORCE) to SET (CMAKE_C_FLAGS"-std = c99-Wall-fPIC "cache string" Flags used by the compiler during all build types. "force)deletes cmakecache.txt in buildand then cmake and make again. Get 2.libcurl.adownload curl-7.42.1.tar.gz this library is compiled with configure the same export PATH =/home/slk/STM/STLinux-2.4/devkit/armv7/arm-cortex-linux-gnueabi/bin: $ PATH, in this way, you do not need to set the CC parameter for configure. After generation, the problem is also caused by the absence of-fPIC. Therefore, modify all Makefile files and add-fPIC to the end of CFALGS. When make reaches 88%,/bin/sh :. /comp_err, unable to execute the binary file error, then decompress a mysql-connector-c-6.1.6-src, with the gcc under linux for compilation, after compilation successful, copy comp_err to the corresponding folder on the Cross-compilation side and continue to make. Done.