Re: Adding obj-c++ file to carbon project changes preprocessed header file types
Re: Adding obj-c++ file to carbon project changes preprocessed header file types
- Subject: Re: Adding obj-c++ file to carbon project changes preprocessed header file types
- From: Russ <email@hidden>
- Date: Mon, 11 Feb 2008 21:23:34 -0800 (PST)
--- Jens Alfke <email@hidden> wrote:
> Short answer: The solution is either to rename the .m file
> to .mm,
This definitely doesn't work, I've tried both repeatedly.
> or to edit your .pch file and wrap an "#ifdef __cplusplus"
> around any parts of it that are C++ specific.
There are a bajillion .h files from all kinds of places in my app and
supporting libraries. Messing with every .h file is a non-starter.
> Adding a .m file to your project won't affect the other source files.
Yeah, but it does, and not in a good way. This is an existing running
commercially-released c++ project (the part I'm working on is a bunch of
support libraries for it.).
If I create an EMPTY file foo.m and add it to the 100% working project, adding
that EMPTY file to the build causes the compile to bomb horribly. That's just
unacceptable. (Removing the file from the build and we're all happy again.)
> the prefix file of your project ("MyProject.pch" by default).
I'm not too clear on what the build system is doing---I certainly don't have a
.pch file I have created in my project, that is something the build system is
creating.
> Since there's only one prefix file, it gets used for every
> different language used in your project. It actually gets compiled
> separately: once as C, once as C++, once as Obj-C...
This is a stunningly bad idea if true. 0% scalability, 0% separability, just a
clean architectural botch.
> (That said, I suspect that NSCursor by itself isn't going to work
> right in a Carbon app.
There's a sample app for this, it's the only way to access state-of-the-art
cursor functionality in OS X. But no help at all if it can't be compiled with
anything else.
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
_______________________________________________
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