On Fri, Jul 8, 2011 at 5:45 PM, G S <stokest...@gmail.com> wrote:
>> Are you compiling this file as Objective-C++?
>
> Yes, the implementation is an mm file.
>

Okay, that's important.

Look at $SDKROOT/usr/include/c++/4.2.1/cmath and you'll see that it
#undefines isinf and declares std::isinf as a wrapper. So if you
happen to #include <cmath> before #importing
<MapKit/MapKitGeometry.h>, the compiler will dutifully complain.

I don't know what the recommended solution would be here, since I
don't work with C++. Possible solutions that come to mind are
splitting your C++ code and Objective-C code into separate files, and
only including the bare minimum of glue in an Objective-C++ file; or
#importing <math.h> after whatever it is that #includes <cmath>, but
before #importing <MapKit/MapKit.h>; or inserting a `using namespace
std;` before #importing <MapKit/MapKit.h>.

But it's clear this is a result of using Objective-C++, not a fault in MapKit.

--Kyle Sluder
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to