I am trying to compile boost under iOS, but every time I try to launch my project errors occurs like this:
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/usr/include/c++/4.2.1/bits/c++locale.h:79:28: No member named 'vsnprintf' in namespace 'std'; did you mean 'vsprintf'?
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/usr/include/c++/4.2.1/bits/c++locale.h:79:60: Too many arguments to function call, expected 3, have 4
I think that the main reason is compiler, I try to change some settings and play with compiler but every time new errors occurs, so here are my current settings for compiler,
- C Language Dialector – C99[-std=c99]
- C++ Language Dialector – C++98[-std=C++98]
- C++ Standard library – libstdc++
Boost version is 1.44.0,
XCode version is 4.5
Anybody knows how I must configurate my project to compile boost under iOS ?
According to this reference page for
vsnprintf()it was introduced in C++11, so instead of-std=C++98try-std=C++0x(however, the compiler may not support all features introduced in C++11).