#遇到下面错误: # more undefined references to `__sync_sub_and_fetch_4' follow # obj/release/JSObjectRef.o: In function `JSClassRetain': # JSObjectRef.cpp:(.text+0x88): undefined reference to `__sync_add_and_fetch_4' # obj/release/JSObjectRef.o: In function `JSClassRelease': # JSObjectRef.cpp:(.text+0x520): undefined reference to `__sync_sub_and_fetch_4' # obj/release/JSStringRef.o: In function `JSStringRetain': # JSStringRef.cpp:(.text+0x108): undefined reference to `__sync_add_and_fetch_4' # obj/release/JSStringRef.o: In function `JSStringRelease': # JSStringRef.cpp:(.text+0x2ec): undefined reference to `__sync_sub_and_fetch_4' # obj/release/JSStringRef.o: In function `JSStringIsEqualToUTF8CString': # JSStringRef.cpp:(.text+0x348): undefined reference to `__sync_sub_and_fetch_4' # obj/release/JSValueRef.o: In function `JSValueToStringCopy': # JSValueRef.cpp:(.text+0x1818): undefined reference to `__sync_sub_and_fetch_4'
2、在此文件中写入以下内容并保存退出: #!/bin/sh make clean && make distclean echo "ac_cv_func_malloc_0_nonnull=yes" >arm-linux.cache CC=arm-none-linux-gnueabi-gcc ./configure --host=arm-none-linux-gnueabi --prefix=/usr/local/tslib --cache-file=arm-linux.cache make && make install
3、交叉编译: ./configTslib14.sh
三、交叉编译Qt5.2.1:
1、解压Qt5.2.1: tar -zxvf qt-everywhere-opensource-src-5.2.1.tar.gz