CheckExecutableArchitecture

Last Revision:
Version 1.0, 2006-02-07
Determine whether a particular Mach-O executable contains a version suitable for executing on a given processor architecture.
Build Requirements:
Mac OS X
Runtime Requirements:
Mac OS X

This sample deals with the problem of determining in advance whether a particular Mach-O executable contains a version suitable for executing on a given processor architecture. For example, an application running on an Intel-based Macintosh may wish to examine a set of potential plugins, because it suspects that some of them may be PowerPC-only and thus not suitable for loading. The code here may also be instructive and relevant for those who wish to understand the structure of Mach-O executables.