• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Why won't iOS app using MKMapView compile?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why won't iOS app using MKMapView compile?


  • Subject: Re: Why won't iOS app using MKMapView compile?
  • From: Kyle Sluder <email@hidden>
  • Date: Fri, 08 Jul 2011 17:51:30 -0700

On Fri, Jul 8, 2011 at 5:45 PM, G S <email@hidden> 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 (email@hidden)

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:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Why won't iOS app using MKMapView compile?
      • From: G S <email@hidden>
    • Re: Why won't iOS app using MKMapView compile?
      • From: Greg Parker <email@hidden>
References: 
 >Why won't iOS app using MKMapView compile? (From: G S <email@hidden>)
 >Re: Why won't iOS app using MKMapView compile? (From: Chris Ridd <email@hidden>)
 >Re: Why won't iOS app using MKMapView compile? (From: G S <email@hidden>)
 >Re: Why won't iOS app using MKMapView compile? (From: G S <email@hidden>)
 >Re: Why won't iOS app using MKMapView compile? (From: koko <email@hidden>)
 >Re: Why won't iOS app using MKMapView compile? (From: Conrad Shultz <email@hidden>)
 >Re: Why won't iOS app using MKMapView compile? (From: G S <email@hidden>)
 >Re: Why won't iOS app using MKMapView compile? (From: G S <email@hidden>)
 >Re: Why won't iOS app using MKMapView compile? (From: Kyle Sluder <email@hidden>)
 >Re: Why won't iOS app using MKMapView compile? (From: G S <email@hidden>)

  • Prev by Date: Re: Why won't iOS app using MKMapView compile?
  • Next by Date: Re: Why won't iOS app using MKMapView compile?
  • Previous by thread: Re: Why won't iOS app using MKMapView compile?
  • Next by thread: Re: Why won't iOS app using MKMapView compile?
  • Index(es):
    • Date
    • Thread