ADC Home > Reference Library > Technical Q&As > Carbon > Graphics & Imaging >
Important: The information in this document is Not Recommended and should not be used for new development.
Current information on this Reference Library topic can be found here:
|
Q: I have a sample program compiled with SC. When I try to link the sample program, I get the following linker error:
"qd" is the QuickDraw global variable. If I declare the global, as in
the error goes away. This is confusing, because globals declared for PowerPC code should also be automatically declared for 68K files. In fact, this same code compiles and links correctly with Symantec C++ v7.0 IDE, as well as Metrowerks Codewarrior. Is there some new library I need to include to get the 68K global declared? Or has some subtle change been made to the header files? A: Recently, there has been a change to the MPW libraries for the classic Macintosh runtime architecture. The MPW libraries now require that the QuickDraw global qd be defined in the global space of your code, the same as in the MPW libraries for the other Macintosh runtime architectures (namely, PowerPC and CFM-68K runtime architectures). If you are working in the MPW environment, a simple definition such as:
is all that is necessary. If you are working in multiple environments (say, MPW, Metrowerks, and Symantec), use a preprocessor conditional such as:
may be required. For more details on the use of QDGlobals and qd, see Technote 1016 - Where Has my qd gone? How Do I Use qd and QDGlobals Correctly? |
|