Carbon and Mach-O?

Carbon and Mach-O?

Post by Charles Th » Fri, 21 Nov 2003 01:13:04


I've been told that to have an OSX application that accesses USB ports I
have to have a Mach-O application.

Does this mean that I have lost all access to carbon functionality?

When I try to build my application it tells me it cannot open the carbon
headers like "Events.h", "Dialog.h", "Files.h", etc.

Is the carbon toolbox off limits for a Mach-O application?

I've not yet found a decent explanation of Mach-O beyond its description
as the UNIX programming language on which OSX is based.

I guess I don't fully understand how Carbon and Mach-O relate to each
other, if at all.

Can a Carbon application access USB ports using Mach-O code like that
contained in the IOKit?

CT
 
 
 

Carbon and Mach-O?

Post by Sean McBri » Fri, 21 Nov 2003 01:30:45

In article < XXXX@XXXXX.COM >,



You can still do it from a CFM app, but its a pain. If your app only
needs to support OS X, you are better switching to Mach-O.


No. Carbon is an API and can be used by CFM or Mach-O apps.


You need to use framework style includes.


No.


Please read the System Overview book. :)

 
 
 

Carbon and Mach-O?

Post by Eric VERGN » Fri, 21 Nov 2003 02:04:56

>> I guess I don't fully understand how Carbon and Mach-O relate to each

They don't. Carbon is a system API. Cocoa is a system API. Carbon is
available in CFM (Code Fragment Manager) and Mach0. Cocoa is available only
in Mach0.

CFM and Mach0 are 2 executable file formats, very much like PEF on Windows.
Because some MacOSX system APIs are only available in Mach0 format, you
should use this format if you need them.

Eric
 
 
 

Carbon and Mach-O?

Post by Charles Th » Fri, 21 Nov 2003 02:16:33

In article <BBE16148.1606D% XXXX@XXXXX.COM >,



Thanks for the info, Eric.

Once I figured out that I had to replace my myriad of individual header
calls to just two calls:

#include <Carbon/Carbon.h>
#include <Quicktime/Quicktime.h>

everything started compiling without errors.

CT
 
 
 

Carbon and Mach-O?

Post by MW Ro » Fri, 21 Nov 2003 02:50:11

In article <BBE16148.1606D% XXXX@XXXXX.COM >,




PEF (Portable Executable Format) is an executable format for OS X and OS
9 both. CFM (Code Fragment Manager) is not an executable format.
CFM is the part of the Macintosh system software that loads fragments
into memory and prepares them for execution. I believe that Windows
uses XCOFF format


Right

By the way there are examples of using Mach-O stuff with CFM in the CW
Examples folder.

Ron

--
New from Metrowerks
The CodeWarrior Wireless Development Kit for Symbian OS, SEMC P900 Edition
Easy-to-use, integrated tools and hardware for SEMC P900 Development
http://www.yqcomputer.com/

Ron Liechty - XXXX@XXXXX.COM - http://www.yqcomputer.com/
Ron Liechty - XXXX@XXXXX.COM - http://www.yqcomputer.com/
 
 
 

Carbon and Mach-O?

Post by Miro Juris » Fri, 21 Nov 2003 04:35:09

In article <BBE16148.1606D% XXXX@XXXXX.COM >,



It's Mach-O (with the letter oh), not Mach0 (with the number zero).

meeroh

--
If this message helped you, consider buying an item
from my wish list: < http://www.yqcomputer.com/ ;
 
 
 

Carbon and Mach-O?

Post by Eric VERGN » Fri, 21 Nov 2003 08:46:24

dans l'article XXXX@XXXXX.COM , MW Ron XXXX@XXXXX.COM a rit le 19/11/03 18:50


Have a look at:

msdn.microsoft.com/library/default.asp?url=/library/en-us/dndebug/html/msdn
_peeringpe.asp

Eric
 
 
 

Carbon and Mach-O?

Post by Mike Cohe » Fri, 21 Nov 2003 09:54:42

In article < XXXX@XXXXX.COM >,



No - Carbon & Mach-O are perfectly compatible. Carbon applications can
be either CFM or Mach-O executables.

Instead of including all of those headers, you only need to #include
<Carbon/Carbon.h> and make sure you link to the Carbon framework.

--
Mike Cohen - mike3k <at> onepost <dot> net
Personal: http://www.yqcomputer.com/
Mac News: http://www.yqcomputer.com/