ilibjingle 编译 for iphoneSimulator

============================================================
博文原创,转载请声明出处
电子咖啡(原id蓝岩)
============================================================

******

修改main.soncs

mac_env.Replace(CC = '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/i686-apple-darwin10-llvm-g++-4.2')  
# Use my-gcc instead of the default compiler.
mac_env.Replace(CXX = '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/i686-apple-darwin10-llvm-gcc-4.2')  
# Use my-gcc instead of the default compiler.

**

mac_env.Replace(CC = '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-gcc-4.2')  
# Use my-gcc instead of the default compiler.
mac_env.Replace(CXX = '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/llvm-g++-4.2')  
# Use my-gcc instead of the default compiler.

**

mac_env.Replace(CC = '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/bin/llvm-gcc-4.2')  
# Use my-gcc instead of the default compiler.
mac_env.Replace(CXX = '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/bin/llvm-g++-4.2')  
# Use my-gcc instead of the default compiler.

**

mac_env.Replace(CC = '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2')  
# Use my-gcc instead of the default compiler.
mac_env.Replace(CXX = '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-g++-4.2')  
# Use my-gcc instead of the default compiler.


**

*************

修改main.scons的sdk

注意,这里是

    '-isysroot', '/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk',
而不是

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk
否则会出现以下错误:

________Compiling build/dbg/obj/third_party/expat-2.0.1/lib/xmlparse.o
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/include/sys/_types.h:33,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/include/_types.h:27,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/include/string.h:61,
                 from third_party/expat-2.0.1/lib/xmlparse.c:6:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/include/machine/_types.h:32:25: error: i386/_types.h: No such file or directory
In file included from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/include/_types.h:27,
                 from /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk/usr/include/string.h:61,
                 from third_party/expat-2.0.1/lib/xmlparse.c:6:
***************

下面的问题或许会用得到

********

Q: change C language dialect to GNU89 to get rid of asm and inline issues

Xcode 4.2 had finally added support for C++0X:

  1. In the project build settings screen, switch on "All" options.

  2. In the "Build Options" section, set compiler to "Apple LLVM compiler 3.0".

  3. Scroll down to "Apple LLVM Compiler 3.0 - Language" section and set "C++ Language Dialect" to "C++0X" and "C++ Standard Library" to "libc++".

The std::move(), move constructor and R-Value reference are known to work as expected, and I'm testing on the std::thread and std::atomic.

************

Error:  

 asm("bswap %0" : "=r" (v) : "0" (v)); 

implicit declaration of function asm is invalid in c99

fix: 修改c dialect 为 GUN89



*********

Error

ld: warning: directory not found for option '-L/ilibjingle/gtalk/libjingle-0.5/talk/build/dbg/lib /ilibjingle/gtalk/libjingle-0.5/talk/third_party/openssl-1.0.0 /ilibjingle/gtalk/libjingle-0.5/talk/third_party/openssl-1.0.0/lib'
ld: library not found for -lcrypto-iphone
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Fix:

build setting -> basic -> 搜索对应的目录关键字,将之改为正确的路径,这样子可以修复上面的warning。



****


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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值