ADC Home > Reference Library > Technical Q&As > Legacy Documents > Graphics & Imaging >

Legacy Documentclose button

Important: This document is part of the Legacy section of the ADC Reference Library. This information should not be used for new development.

Current information on this Reference Library topic can be found here:

QuickDraw GX Print Extension


Important for all Apple Printing and Graphics Developers:

The information in this Technical Q & A is still relevant up to and including Mac OS 7.6 with QuickDraw GX 1.1.5. Beginning with the release of Mac OS 8.0, however, Apple plans to deliver a system which incorporates QuickDraw GX graphics and typography only. QuickDraw GX printer drivers and GX printing extensions will not be supported in Mac OS 8.0 or in future Mac OS releases. Apple's goal is to simplify the user experience of printing by unifying the Macintosh graphic and printing architectures and standardizing on the classic Printing Manager.

For details on Apple's official announcement, refer to </dev/technotes/gxchange.html>

Q: I'm working on a GX print extension that needs to call some C++ routines. Is there a way to accomplish this with either MPW or Metrowerks?

A: It is possible to include C++ code in a QuickDraw GX print extension, but it may be difficult, depending on the compiler you choose. There is a related article in issue 4 of develop, which is available on the Developer CD Series. This code does everything necessary to initialize your C++ vtables, since in a stand-alone code resource (your print driver), this is not done for you by the runtime support. Note that vtable layouts are C++ compiler specific.

Support for CFront is being discontinued, so you may want to look into using Symantec's C/C++ for Macintosh or MetroWerks C/C++. The glue code referred to in the develop 4 issue article needs to be modified to work with Symantec's/MetroWerks' compilers. Note that documentation on exact vtable layout in Symantec/MetroWerks may not be readily available.

You could also use the Code Fragment Manager. However, this would work only for the PowerPC environment at this time, since a Code Fragment Manager is not yet available for the 68K environment. CFM fragments can be written in any language, including C++.

[May 01 1995]


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.