HOWTO: Build "FAT" Macintosh Applications

Last reviewed: October 6, 1997
Article ID: Q154605
The information in this article applies to:
  • Microsoft Visual C++, Macintosh Cross-Development, version 4.0 on the following platforms: - 68k Macintosh - Power Macintosh

SUMMARY

This article describes how to create "fat" Macintosh applications. Most commercial Macintosh applications on the market today are available in "fat" versions. A "fat" application includes both 68K and PowerPC code so it can run on either platform.

MORE INFORMATION

The process of creating a "fat" application consists of building a Power Macintosh application and a 68K application and then merging the CODE resources from the 68K build into the Power Macintosh application. The merging can be done with ResEdit.

To build a "fat" version of your program that will run optimized on both 68K and Power Macintoshes, do the following:

  1. Build the 68K-targeted application with Visual C++ and transfer it to the Power Macintosh.

  2. Build the PowerPC-targeted application with Visual C++ and transfer it to the Power Macintosh.

  3. Open both versions with ResEdit.

  4. Copy all of the resources from the 68K version to the Power Macintosh version. If ResEdit asks you to resolve the conflicting resource IDs, it is better to choose to replace the existing IDs.

Additionally, the SIZE resource contains information regarding the size of the application memory partition. The optimal memory partition size often varies between the Power Macintosh and the 68K Macintoshes. After copying the resources from the 68K application, edit the SIZE resource in ResEdit to a memory partition size that works well on both the 68K and Power Macintosh. "Fat" applications may require significantly more disk space.

You now have a "fat" application. This assumes that you have the same menus, windows, dialogs, and other resources for both versions of the program and that the two targets are both in the same Visual C++ project.

REFERENCES

Most of the contents of this article is duplicated in the Online Documentation under "README for Microsoft Visual C++ Version 4.0" heading.

It can also be found in the VCREAD.WRI file under the MSDEV directory.

Keywords          : MacPrgIss VCMac
Version           : WINNT:4.0;MAC:4.0;
Platform          : MACINTOSH NT WINDOWS
Issue type        : kbhowto


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: October 6, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.