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?



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.



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.