C++ Boost on iPhone

2020-02-20 05:28发布

问题:

I need to use the boost serialization code. I am in the process of testing it on Android (using the NDK, obviously). Before i decide if i really want to use boost serialization code in my projects, i would like to know if boost can be compiled and used in iPhone applications. I ask this because compiling boost on Android is not an immediate thing to do, so there is the possibility that boost on iPhone will be as hard to compile as Android (sigh). Thx.

回答1:

This blog will probably help you.

It says that Pete Goodliffe wrote a script that builds the boost libraries into an iOS framework. There is also an XCode project compiling the whole thing.

If people tell you that you can't use custom frameworks in iOS applications this is not true. So long as the framework is properly built (architectures for i386,armv6 and armv7 all lipoed together) this will work.

I haven't tried that particular framework but if it's correctly setup I am sure this will do the trick.

Keep us posted.



回答2:

Hey I have updated Pete Goodliffes script in my openFrameworks addon:

  • It currently has arm64, armv7, i386, x86_64
  • Boost 1.59.0 or previous
  • libc++ / std=c++11 -- Now optional release for libstdc++
  • Precompiled and Script to build yourself (so if you need libstdc++ quite easy to change)
    • Supports Xcode 7

https://github.com/danoli3/ofxiOSBoost



标签: iphone boost