|
Geometry : |
Subject: [ggl] Re: problems with Boost Geometry Xcode compile?
From: Mark McCann (mmccann)
Date: 2010-03-09 16:21:23
Hi Stjepan, You figured it out exactly. When I dumped the Xcode
precompile for my file which includes <boost/geometry/geometry.hpp> I
found:
template <typename Geometry>
inline void do { if ( __builtin_expect(!(), 0) ) { DebugAssert('?*?*',
0, "Third Party Client" ": " "", 0, 0, "/usr/local/include/boost/
geometry/geometries/concepts/check.hpp", 181, (void*)0); } } while ( 0 )
{
detail::checker<Geometry, boost::is_const<Geometry>::type::value>
c;
boost::ignore_unused_variable_warning(c);
}
Which looks like the result of this define macro in AssertMacros.h:
#if DEBUG_ASSERT_PRODUCTION_CODE
#define check(assertion)
#else
#define
check(assertion) \
do
\
{ \
if ( __builtin_expect(!(assertion),
0) ) \
{ \
DEBUG_ASSERT_MESSAGE( \
DEBUG_ASSERT_COMPONENT_NAME_STRING, \
#assertion, \
0, \
0, \
__FILE__, \
__LINE__, \
0); \
} \
} while ( 0 )
#endif
and this definition for "check" in the Boost.Geometries check.h file:
template <typename Geometry>
inline void check()
{
detail::checker<Geometry, boost::is_const<Geometry>::type::value>
c;
boost::ignore_unused_variable_warning(c);
}
Now that we've figured that out, do you have any idea at to what the
fix would be? My #undef hack seems to work ok, but this is an ugly
hack.
- Mark
On Mar 9, 2010, at 2:01 PM, Stjepan Rajko [via Boost Geometry] wrote:
> On Tue, Mar 9, 2010 at 12:58 PM, Mark McCann <[hidden email]> wrote:
>
> OK. So I figured out that there must be a macro in the wxWidgets
> library for
> the symbol "check." ? I know this since writing:
> #ifdef check
> #undef check
> #endif
> #include <boost/geometry/geometry.hpp>
>
> fixed the issue. ? I don't think this in my code specifically
> because I tried
> it in two different wx projects. ? Anybody know how to track down
> exactly
> where a macro is defined? ? If this is a problem in wxWidgets, then
> this
> might impact a lot of potential C++ projects that use Boost.Geometry.
>
> This could be an Apple macro from AssertMacros.h (which might in
> turn get included by wxWidgets).
>
> Best,
>
> Stjepan
>
>
> _______________________________________________
> ggl mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/ggl
>
>
> View message @ http://n3.nabble.com/problems-with-Boost-Geometry-Xcode-compile-tp437866p438382.html
> To unsubscribe from Re: problems with Boost Geometry Xcode compile?,
> click here.
>
-- View this message in context: http://n3.nabble.com/problems-with-Boost-Geometry-Xcode-compile-tp437866p438412.html Sent from the Boost Geometry mailing list archive at Nabble.com. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.osgeo.org/pipermail/ggl/attachments/20100309/fcd96078/attachment-0001.html
Geometry list run by mateusz at loskot.net