Re: cpp class keywotd
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