Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Any CW mach-o success stories out there?



Thanks for the help George! I managed to get my app up and running today
in a mach0 version by doing most of the things you suggested. I actually
didn't change any of the qProjectBuilder conditioned includes - they don't
seem to do any harm. Had to skip the newest version of
CSessionPrintinting_AC though - seems to have some problems including the
CFrameworkBundle stuff. And the CW packager is far from perfect - we must
hope for CW 8 to improve that.

The only problem now is that when I move on to doing what actually urged
me to build in mach-o I run into problems. I need to access the IOKit
framework, but when I include the corresponding framework style headers I
get a lot of seemingly duplicate definitions of things in
CFBase.h,CFString.h etc.

I haven't spent too much time on this yet, but of course if anyone has a
clue I'd be interested.

Carsten





George Varga <email@hidden>
Sent by: email@hidden
22/05/02 20:09

To: MacApp developer list <email@hidden>
cc:
Subject: Re: Any CW mach-o success stories out there?


>Did anyone actually manage to build a mach-o version of their MacApp
>application using CW7.

Yes it is me.

> If so I'd love to hear about your experiences, and
>possible pitfalls.

I already wrote about this last October. Here are those lines:

The necessary changes are (sorry, no explicit code here):

- create a .pch file for macho (by duplicating the carbon one) and
add to it the following defines
#define qCarbonMach0 1

- some includes that were bracketed with #if !qProjectBuilder should
be changed #if !qProjectBuilder && !qCarbonMachO (or just
!qCarbonMachO)
- some using std::XXX must be bracketed #if !qCarbonMachO
- some direct use of the std::XXX must be either changed to "using
std::XXX" in the beginning of the file or should be changed to XXX
- CAEValue's copy constuctor must be implemented. you should change
the #if to #if qProjectBuilder || qCarbonMachO

if you add the macApp sources to your project the link order is important:
your sources and macApp sources
the .pch file
the libraries
the .a files
crt1.o


There is a problem with fp.h which prevents compiling it. (relation
is only defined for non CW builds)

I added the following lines to MAToolboxHeaders.h at line 114:

// ARTMAMod, there is a bug in UH 4.0
#if TYPE_LONGDOUBLE_IS_DOUBLE && __MWERKS__
#define relation(a,b) true
#endif

There is also a problem with the MediaHandlers.h which is included
indirectly in one of the MA sources.
It references a structure in sounds.h but does not includes it.
the solution is to "decomment" Sounds.h include in MAToolboxHeaders.h
at line 183

I should clearly note that setting up a mach-O application under CW
is much harder than in project builder, because you have to make the
bundle directory, hand copy files, etc. However the speed gain is
significant.


George Varga
_______________________________________________
macapp-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macapp-dev
Do not post admin requests to the list. They will be ignored.
_______________________________________________
macapp-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/macapp-dev
Do not post admin requests to the list. They will be ignored.



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.