简体   繁体   中英

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 ?

根据vsnprintf()这个参考页面,它是在C ++ 11中引入的,所以代替-std=C++98 try -std=C++0x (但是,编译器可能不支持C +中引入的所有功能) +11)。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM