Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / CodeWarrior / December 2003



Tip: Looking for answers? Try searching our database.

moving from <Carbon.h> to <Carbon/Carbon.h>

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
David Greenfield - 17 Dec 2003 20:00 GMT
Hi.

I have a CW7 Carbon CFM project that, up until now, has been compiled
using Universal Headers v3.4.2.  Now I want to be able to call
SetFrontProcessWithOptions() but I find that it's not available in
Processes.h, and so I need to upgrade the headers (as well as CW, though
not quite yet).  I'm having trouble locating documentation describing
how to  configure things so that I can use #include <Carbon/Carbon.h>
and I haven't yet been able to figure it out on my own.  If anyone can
point me to some documentation or describe how to go about this I'd be
much obliged.

Thanks in advance.

David
Sean McBride - 19 Dec 2003 01:02 GMT
> I have a CW7 Carbon CFM project that, up until now, has been compiled
> using Universal Headers v3.4.2.  Now I want to be able to call
> SetFrontProcessWithOptions() but I find that it's not available in
> Processes.h, and so I need to upgrade the headers (as well as CW, though
> not quite yet).  I'm having trouble locating documentation describing
> how to  configure things so that I can use #include <Carbon/Carbon.h>

This is called "framework style includes".

> and I haven't yet been able to figure it out on my own.  If anyone can
> point me to some documentation or describe how to go about this I'd be
> much obliged.

I think the CW 8 release notes have some info in the file
"Making_Mach-O_Projects_Note.txt".  Are you moving to MachO also?  I
seem to recall that you must use Mach-O with framework style includes,
but I'm not sure.
Miro Jurisic - 19 Dec 2003 05:26 GMT
> > I have a CW7 Carbon CFM project that, up until now, has been compiled
> > using Universal Headers v3.4.2.  Now I want to be able to call
[quoted text clipped - 4 lines]
>
> This is called "framework style includes".

Yes, except that framework style includes are unavailable on CFM. He either has
to switch to Mach-O or copy+paste the declarations from the Mach-O carbon
headers into a private header, and link with CarbonLib that's in
/System/Library/CFMSupport/StubLibraries

hth

meeroh

Signature

If this message helped you, consider buying an item
from my wish list: <http://web.meeroh.org/wishlist>

Alexey Proskuryakov - 19 Dec 2003 08:45 GMT
On 19.12.2003 08:26, in article
macdev-2D5263.00262619122003@senator-bedfellow.mit.edu, "Miro Jurisic"
<macdev@meeroh.org> wrote:

>> This is called "framework style includes".
>
> Yes, except that framework style includes are unavailable on CFM.

 What about the aliases in
/Developer/SDKs/MacOSX10.3.0.sdk/Developer/Headers/CFMCarbon?

- WBR, Alexey Proskuryakov
Miro Jurisic - 19 Dec 2003 14:07 GMT
>   What about the aliases in
> /Developer/SDKs/MacOSX10.3.0.sdk/Developer/Headers/CFMCarbon?

They don't work with CW's CFM compilers.

meeroh

Signature

If this message helped you, consider buying an item
from my wish list: <http://web.meeroh.org/wishlist>

Alexey Proskuryakov - 19 Dec 2003 15:10 GMT
On 19.12.2003 17:07, in article
macdev-4AA83D.09071219122003@senator-bedfellow.mit.edu, "Miro Jurisic"
<macdev@meeroh.org> wrote:

>>   What about the aliases in
>> /Developer/SDKs/MacOSX10.3.0.sdk/Developer/Headers/CFMCarbon?
>
> They don't work with CW's CFM compilers.

 What problems did you encounter?

 I've just compiled a fairly large CFM project with these headers just by
adding an access path above {Compiler}MacOS Support. I've only had to remove
a few definitions that we previously copied from the framework headers :)

 I've changed a few includes to framework-style, of course, to see if it
actually works. I used CW 8.3, but don't expect any problems with 9.1,
either.

- WBR, Alexey Proskuryakov
Miro Jurisic - 19 Dec 2003 15:50 GMT
> On 19.12.2003 17:07, in article
> macdev-4AA83D.09071219122003@senator-bedfellow.mit.edu, "Miro Jurisic"
[quoted text clipped - 6 lines]
>
>   What problems did you encounter?

Many of those headers include other headers using a framework-style include. I
am not sure how you got that to work. (In fact, I am not sure I believe it, but
I don't have the time to check this minute.)

meeroh

Signature

If this message helped you, consider buying an item
from my wish list: <http://web.meeroh.org/wishlist>

Alexey Proskuryakov - 19 Dec 2003 16:03 GMT
On 19.12.2003 18:50, in article
macdev-DF11C8.10501219122003@senator-bedfellow.mit.edu, "Miro Jurisic"
<macdev@meeroh.org> wrote:

>>>>   What about the aliases in
>>>> /Developer/SDKs/MacOSX10.3.0.sdk/Developer/Headers/CFMCarbon?
[quoted text clipped - 7 lines]
> but
> I don't have the time to check this minute.)

 You are probably thinking of FlatCarbon, while I'm writing about CFMCarbon
- it has subdirectories for that very purpose (e.g., there's a link
CFMCarbon/CoreServices/CoreServices.h).

- WBR, Alexey Proskuryakov
Miro Jurisic - 19 Dec 2003 17:17 GMT
> On 19.12.2003 18:50, in article
> macdev-DF11C8.10501219122003@senator-bedfellow.mit.edu, "Miro Jurisic"
[quoted text clipped - 16 lines]
> - it has subdirectories for that very purpose (e.g., there's a link
> CFMCarbon/CoreServices/CoreServices.h).

Oh, yeah, you are right. I missed that.

meeroh

Signature

If this message helped you, consider buying an item
from my wish list: <http://web.meeroh.org/wishlist>

David Greenfield - 19 Dec 2003 14:21 GMT
> In article <cwatson-44C16D.20022118122003@aeinews.aei.ca>,
>
[quoted text clipped - 6 lines]
>
> meeroh

Thanks for the tip, but I just tried it and got a link error -
"undefined 'SetFrontProcessWithOptions()'..." - so I guess it's not in
/System/Library/CFMSupport/StubLibraries/CarbonLibStub.  Perhaps it's in
some other lib?

David
Miro Jurisic - 19 Dec 2003 15:49 GMT
> Thanks for the tip, but I just tried it and got a link error -
> "undefined 'SetFrontProcessWithOptions()'..." - so I guess it's not in
> /System/Library/CFMSupport/StubLibraries/CarbonLibStub.  Perhaps it's in
> some other lib?

You are compiling C++ and you need to put the declaration in an extern "C" {}
block.

hth

meeroh

Signature

If this message helped you, consider buying an item
from my wish list: <http://web.meeroh.org/wishlist>

David Greenfield - 20 Dec 2003 01:58 GMT
>>Thanks for the tip, but I just tried it and got a link error -
>>"undefined 'SetFrontProcessWithOptions()'..." - so I guess it's not in
[quoted text clipped - 7 lines]
>
> meeroh

That was it.  Beautiful.  Thanks a million.

David
David Phillip Oster - 19 Dec 2003 07:38 GMT
> > I have a CW7 Carbon CFM project that, up until now, has been compiled
> > using Universal Headers v3.4.2.  Now I want to be able to call
[quoted text clipped - 13 lines]
> seem to recall that you must use Mach-O with framework style includes,
> but I'm not sure.

I've previously posted on extracting Mach-O function pointers from
frameworks, and using those function pointers in CFM programs.
Miro Jurisic - 19 Dec 2003 13:25 GMT
> I've previously posted on extracting Mach-O function pointers from
> frameworks, and using those function pointers in CFM programs.

Not necessary in this case. As I already noted, the function in question
(SetFrontProcessWithOptions) is available in CFM if you just link with the
CarbonLib stub in Mac OS X CFMSupport.

meeroh

Signature

If this message helped you, consider buying an item
from my wish list: <http://web.meeroh.org/wishlist>

David Phillip Oster - 20 Dec 2003 22:57 GMT
> > I've previously posted on extracting Mach-O function pointers from
> > frameworks, and using those function pointers in CFM programs.
[quoted text clipped - 4 lines]
>
> meeroh

Thanks. I'm always amazed at the depth of your knowledge. Lately, I'll
know the old way to do something, and you'll teach me that there is a
newer, recommended, way to do it. What should I be reading, to catch up?

-- David Phillip Oster
Miro Jurisic - 21 Dec 2003 06:06 GMT
> > > I've previously posted on extracting Mach-O function pointers from
> > > frameworks, and using those function pointers in CFM programs.
[quoted text clipped - 6 lines]
> know the old way to do something, and you'll teach me that there is a
> newer, recommended, way to do it. What should I be reading, to catch up?

Uh... this newsgroup :-) I swear, I don't have a magic way of finding all of
these things out. I read the technotes, the Q&As, and skim Apple's new docs as
they come out, and collect hideous amounts of relevant trivia by doing active
development.

The fact that symbols exported by CarbonLib in CarbonLib SDK, Universal Headers,
and /System/Library/CFMSupport/StubLibraries and not all the same is definitely
in the "trivia I discovered the hard way" category.

meeroh

Signature

If this message helped you, consider buying an item
from my wish list: <http://web.meeroh.org/wishlist>

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.