STLport 5.2.1 for ARM 交叉编译

OS       : Suse 10
Ver      : STLport-5.2.1
Compiler : GNU gcc 4.3.2 for ARM

1. 确保ARM编译成功安装,并配置好环境变量。
2. 解压STLport-5.2.1.tar.gz压缩包
3. 进入STLport-5.2.1目录,执行./configure --target=arm-linux
4. 修改stlport/stl/_cstdlib.h
     搜索宏定义 _STLP_NO_VENDOR_STDLIB_L 共2处,将这2处下的if !defined(__sun)分别修改为
     1处 #if !defined(__sun) && !defined(__arm__) && !defined(__sh__)
    2处 #if !defined (__sun) && !defined(__arm__) && !defined(__mips__) && !defined(__mipsel__) && !defined(__sh__)

5. 回到STLport-5.2.1目录, make下就大功告成。

注释:如不修改_cstdlib.h文件,会出现以下情况
make -C build/lib all;
make[1]: Entering directory `/home/STLport-5.2.1/build/lib'
arm-linux-c++ -pthread -fexceptions  -fPIC -O2  -fvisibility=hidden  -D_GNU_SOURCE -I../../stlport  -c -o obj/arm-linux-gcc/so/dll_main.o ../../src/dll_main.cpp
In file included from ../../stlport/stl/_alloc.h:35,
                 from ../../stlport/memory:29,
                 from ../../src/dll_main.cpp:41:
../../stlport/stl/_cstdlib.h:95: error: 'std::llabs' has not been declared
../../stlport/stl/_cstdlib.h:96: error: 'std::lldiv_t' has not been declared
../../stlport/stl/_cstdlib.h:97: error: 'std::lldiv' has not been declared
../../stlport/stl/_cstdlib.h: In function 'long long int abs(long long int)':
../../stlport/stl/_cstdlib.h:151: error: 'llabs' is not a member of 'std'
../../stlport/stl/_cstdlib.h: In function 'lldiv_t div(long long int, long long int)':
../../stlport/stl/_cstdlib.h:152: error: 'lldiv' is not a member of 'std'

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值