Subject: [ggl] Re: problems with Boost Geometry Xcode compile?
From: Mateusz Loskot (mateusz)
Date: 2010-03-09 15:40:01
Mark McCann 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
> #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?
You may preprocess only your .cpp file and scan output for the macro
and you will find context where it is defined. For instance:
$ g++ -E test.cpp
> If this is a problem in wxWidgets, then this
> might impact a lot of potential C++ projects that use Boost.Geometry.
That's another good example of why macros are evil, especially
if defined using extremely non-unique name.
-- Mateusz Loskot, http://mateusz.loskot.net Charter Member of OSGeo, http://osgeo.org
Geometry list run by mateusz at loskot.net