Viktor Apoyan
Viktor Apoyan

Reputation: 10755

No member named 'vsnprintf' in namespace 'std'; did you mean 'vsprintf'?

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,

  1. C Language Dialector - C99[-std=c99]
  2. C++ Language Dialector - C++98[-std=C++98]
  3. 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 ?

Upvotes: 1

Views: 6076

Answers (1)

hmjd
hmjd

Reputation: 122001

According to this reference page for vsnprintf() it was introduced in C++11, so instead of -std=C++98 try -std=C++0x (however, the compiler may not support all features introduced in C++11).

Upvotes: 3

Related Questions