How can I use boost::test with xcode 4 for testing some ios c++ code? How can I use boost::test with xcode 4 for testing some ios c++ code? xcode xcode

How can I use boost::test with xcode 4 for testing some ios c++ code?


You should build the boost library to a static library ".a" using .configure and make.According to this:

No special build options or macro definitions are required to build the static library. Using the Boost.Build system you can build the static library with the following command from libs/test/build directory:

bjam [-sTOOLS=] {-sBUILD=boost_unit_test_framework}

This library or libraries and their respective headers need to be added to the project. (Two built versions are needed, one i386 for the simulator and one ARM for devices).

  • The static library is imported from Link Binary with Libraries inBuild Phases.
  • Also you need to tell XCode which of these to use, youcan do this by setting contidional build settings in `Build settings-
  • Library search paths. Above this line is where you add the HeaderSearch Path to the boost header files.

After this you should be able to include the headers (Added above) in C++ or objective-C++ code of yours. (To make Obj-C files Obj-C++ files you need to change all deppendent .m files to .mm)

If there is a some problems after this, switching Compiler or standard library for C++ in Build Settings might help.