Xcode, Boost and snprintf (Solution)
Xcode, Boost and snprintf (Solution)
- Subject: Xcode, Boost and snprintf (Solution)
- From: Michael McLaughlin <email@hidden>
- Date: Thu, 03 Jul 2008 10:41:38 -0400
- Thread-topic: Xcode, Boost and snprintf (Solution)
After more Internet searching, I found a "solution" to the problem cited
below. The solution is to *uncheck* the Recursive directive in Xcode
Project settings for Header Paths.
In this instance, the recursive feature is probably not needed so this is
not a true solution.
It looks like c++locale.h might still be broken wrt snprintf() even though
there is a comment about it at the top of this header file.
*****
The list archives contain a lot about Boost but I could not find mention of
this error.
In my code (for i386 and ppc), I have
#include "boost/math/special_functions.hpp"
In my Xcode (v3.0) Objective-C++ project settings, I have a recursive header
path
/usr/local/boost_1_35_0
Starting with a clean build, I get the same error with both Debug and
Release configurations, viz.,
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/i686-apple-darwin9/bits
/c++locale.h: In function 'int std::__convert_from_v(char*, int, const
char*, _Tv, int* const&, int)':
/Developer/SDKs/MacOSX10.5.sdk/usr/include/c++/4.0.0/i686-apple-darwin9/bits
/c++locale.h:72: error: 'snprintf' is not a member of 'std'
The 10.5 SDK contains (c++locale.h:71)
#ifdef _GLIBCXX_USE_C99
const int __ret = std::snprintf(__out, __size, __fmt, __prec, __v);
#else
const int __ret = std::sprintf(__out, __fmt, __prec, __v);
#endif
Xcode appears to be complaining that there should not be any snprintf()
function for i386. I get the same error with a ppc build.
I have never explicitly used c++locale.h before. Is this perhaps a Boost
error as opposed to a c++locale.h error? Or something wrong elsewhere?
Any ideas or workarounds?
Thanks.
--
Mike McLaughlin
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden