• 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: cpp class keywotd
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cpp class keywotd


  • Subject: Re: cpp class keywotd
  • From: koko <email@hidden>
  • Date: Fri, 29 Apr 2011 09:42:45 -0600

BJ -

Great response, thanks for being a professional!

-koko


On Apr 28, 2011, at 10:24 PM, B.J. Buchalter wrote:

>
> On Apr 28, 2011, at 11:48 PM, koko wrote:
>
>> Well, apparently, compiling for iOS app versus iOS static lib treats the processing of the .pch diifferently.
>> Moving some things out of .pch in the app build which are in the .pch of the lib build solved my problem.
>> I would like to know more about this if anyone can shed some light.
>
> If you put it in the .pch, it will get compiled for each of the languages used in your project, including obj-c (which does not understand "class'). The lib probably does not have any .m files, whereas the app does.
>
> That's my guess. You can put preprocessor conditionals around the C++ code so that it only gets precompiled for the languages that support C++.
>
> For example:
>
> #ifdef __cplusplus
>
> // code that requires C++ or obj-c++
>
> #endif
>
> Best regards,
>
> B.J. Buchalter
> Metric Halo
> http://www.mhlabs.com
>
>
>
>

_______________________________________________

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

References: 
 >cpp class keywotd (From: koko <email@hidden>)
 >Re: cpp class keywotd (From: koko <email@hidden>)
 >Re: cpp class keywotd (From: "B.J. Buchalter" <email@hidden>)

  • Prev by Date: Hey,f
  • Next by Date: Re: Aliases with NDAlias not appearing where I tell them to be.
  • Previous by thread: Re: cpp class keywotd
  • Next by thread: iOS: Data sharing/upgrade
  • Index(es):
    • Date
    • Thread