NOTE: MPW is legacy material.
For information on the current Mac OS X development environment, see the Xcode Tools page.
General Information
What is MPW?
A brief description of MPW (Macintosh Programmer's Workshop) is available
here.
What hardware and system software are required to run MPW?
To install and run MPW, you need:
- A 68K Macintosh with a 68020 or higher microprocessor, or a Power Macintosh.
- System 7.5 or later.
- At least 8 megabytes of memory.
How do I obtain MPW?
MPW is provided as part of the Developer CD, a monthly series of CD-ROMs that are sent to members
of Apple's developer programs. MPW is also available free from the Apple Developer
FTP site.
What is the difference between the MPW components available from the Developer CD, the FTP
site, and the MPW web site?
MPW can be found in the "MPW etc." folder on the Tool Chest Developer CD which is usually produced
every three months. The
FTP site
contains a duplicate of the "MPW etc." folder from the most recent Tool Chest Developer CD. The
MPW web site contains components that were updated after the "MPW etc."
folder was last revised. These updated components will appear on the Tool Chest CD (and the FTP
site) the next time the "MPW etc." folder is revised. Note that the
"MPW etc." folder may not be revised for every Tool Chest Developer CD.
The "MPW etc." folder contains a folder named "MPW-GM" and one named "MPW-PR". What's the difference?
The MPW-GM
folder contains a complete Golden Master version of the MPW development environment including the
MPW Shell, tools, interfaces and libraries. The software in this folder is considered to be
"final" quality. The MPW-PR
folder contains Pre-Release versions of some of the software components that make up the MPW
development environment. The components in this folder are not considered to be "final" quality,
however, in some cases they may be more useful than the Golden Master versions as a result of
bug fixes and enhancements. Note that this folder does not contain a complete MPW environment.
See the "About MPW etc." document
(download)
for more information.
Developer CD
- How do I subscribe to the Developer CD Series?
Information on the Apple Developer Connection Mailing, a 12-month subscription that includes the
Developer CD Series and other resources for developers, is available
here.
FTP Server Problems
- I can't connect to the FTP server. What's wrong?
If you can't access the ftp.apple.com server you may be having problems due to a firewall.
The FTP server requires a two-way connection which cannot take place if there is a firewall.
If this is the case, you will need to configure your browser to use an FTP proxy server.
Another possibility is that you don't have a reverse DNS entry.
The FTP server must be able to obtain a domain name from a host's IP address.
Contact your network administrator for more information.
- I can't see any files or folders on the FTP server, it appears to be empty. What's wrong?
The FTP server is updated several times a day. While an update is in progress,
the contents of the server are not visible. Once the update has completed, the files and folders
will become visible again.
Installing MPW
- How do I install MPW from the FTP site?
Detailed instructions for downloading and installing MPW are provided in the
ReadMe file on the FTP site.
- What should I do with the files in the "RuntimeLibraries" folder?
If you're running Mac OS 7.6 or later, you don't need to install any of the runtime libraries in
order to use MPW. (If you're not running Mac OS 7.6 or later, see the
installation instructions.)
The libraries provided in the "RuntimeLibraries" folder are only required if you have an
application or tool that uses them. For example, if you build a program that uses MrCpp
exceptions then you would have to install MrCExceptionsLib in order to run the program.
To "install" a runtime library, either put it in the Extensions folder or in the same folder as
the program that needs it.
- What should I do with the files in the "SharedLibraries" folder?
These files should remain in the "SharedLibraries" folder since they are only used when linking
a program. Although the folder is called "SharedLibraries" for historical reasons, the files are
actually "stub" libraries. A "stub" library is a shared library with all of the code and data
removed. The only information that remains is what is needed by the linker (i.e. exported symbols
and version information).
- Should I install the MPW components available from the MPW web site?
The updated MPW components available from the MPW web site are generally Pre-release versions.
Release Notes are provided for each updated component. You should read the Release Notes to
determine which, if any, of the updated components are necessary or desired for your
development activities.
- I read somewhere that the StdCLib runtime library shouldn't be installed in the Extensions folder. Is this true?
There is an incompatibility between the StdCLib runtime library and certain versions of the
Mac OS when running on certain machines. The details are explained
here.
- I downloaded the MPW Shell and a bunch of other files from the FTP site but MPW doesn't work. What's wrong?
MPW is an integrated environment and, as such, it will not operate properly if only parts of the environment
are installed. Re-install MPW following the instructions in the
ReadMe file.
Getting Started
- How do I get started using MPW?
Information about getting started with MPW is provided in the
ReadMe file on the FTP site.
- How do I learn about programming for the Macintosh platform?
Visit Apple's
Intro to Macintosh Programming
web site for useful links and the technical resources you'll need to program for the
Macintosh platform.
Getting Help
- How do I get help with MPW?
For assistance with MPW, we recommend you
subscribe
to the MPW-Dev Internet mailing list.
- How do I browse/search the MPW-Dev mailing list archives?
Information on browsing/searching the MPW-Dev list archives is available
here.
Documentation
- How do I obtain documentation about MPW?
Reference books and release notes are available in the
Documentation folder
on the FTP site. A description of the contents of the various reference books is available
here.
- What applications do I need to read the documentation?
Most of the documents in the Documentation folder are provided in Adobe Acrobat (PDF) format.
Adobe's Acrobat Reader application is available from their
Acrobat Reader web site.
- Are hard-copy versions of the MPW manuals available for purchase?
The MPW manuals are no longer available for purchase. However, it is possible to have the
electronic manuals (PDF file) printed and bound by a local printing/copy shop.
- PowerPC programs are stored as PEF files. Is there a document describing PEF?
A complete description of PEF can be found in Chapter 8 of the "Mac OS Runtime
Architectures" manual
(download).
The PEFBinaryFormat.h interface file (found in the CIncludes folder) contains a complete set of
data structures and macros for dealing with PEF.
- Where is the PowerPC object file format documented?
Object files generated by PPCAsm and MrC/MrCpp use the Extended Common Object File Format (XCOFF).
An Apple document describing XCOFF is not currently available, however, IBM provides an
online description of XCOFF.
The XCOFF.h interface file (found in the CIncludes folder) contains a complete set of
data structures and macros for dealing with XCOFF.
- Where is the 68K object file format documented?
In the "MPW 68K Object File Format" document
(download).
- Where is the Projector database format documented?
In the "Understanding ProjectorDBs" document
(download).
Building a Program
- How do I build a program with MPW?
A brief explanation of how to build a program is contained in the
ReadMe
file on the FTP site.
Additional information about building programs is contained in Chapter 1 of the
"Building and Managing Programs in MPW" manual
(download).
Compiler and Linker Issues
- The compiler is reporting - undefined identifier 'symbolName'.
How can I find out which header file defines the symbol?
Use the Search command to search the files in the CIncludes folder. For example,
Search "symbolName" -s -rd -word "{CIncludes}"
- ILink is reporting - Undefined entry, name: "qd". What's wrong?
PPCLink is reporting - Reference to unresolved symbol "qd". What's wrong?
Storage for the global "qd" variable must be supplied by your source code. Add the line
QDGlobals qd;
after the #includes and before your main routine. Also, make sure you have
#include <QuickDraw.h>
as part of the #includes.
- Why are there different versions of the StdCLib stub library? Which one should I link against?
The StdCLib stub library is provided in different versions so that developers can
more easily specify which version of StdCLib their program requires at runtime. In general,
the name of the stub library indicates the minimum version of StdCLib that will be required
at runtime. For example, a program linked against the StdCLib_3.5 stub library will not run
unless StdCLib v3.5 (or later) is available at runtime. For further details, see the
release notes for the StdCLib stub libraries.
- How do I define a Pascal string in C/C++ source code?
Use \p as the first character of the string. For example,
"\pThis is a Pascal string."
The \p is treated as one character and indicates a Pascal string literal.
- What pragmas does MrC/MrCpp support?
The supported pragmas are described in the MrC[pp] Specific #Pragmas document.
- What predefined symbols does MrC/MrCpp support?
The MrC and MrCpp compilers support the predefined symbols specified by the ANSI C language
definition, as well as their own predefined symbols for use in conditional compilation.
A list of the symbols is provided here.
- How does MrC/MrCpp resolve multiple occurrences of options?
You can repeat any option on the command line. In most cases the last use
of the option is the one that takes effect; the following options are cumulative:
-d, -i, -xi, -sym on.
The -i option is cumulative and also sensitive to order. MrC/MrCpp searches for
directories named using the -i option in the order in which they appear on
the command line.
Program I/O
- I've built an MPW tool that prints out "Enter a number: " and then reads the number.
But, when I type a number and press ENTER, the program reads the entire line instead
of just the number. What's wrong?
It's due to the way the MPW Shell handles Standard Input. If the current selection in a
window is an insertion point (i.e. nothing is selected), then the entire
contents of the line containing the insertion point is sent to Standard Input.
If you have selected some text in the window, only the contents of the
selection is passed to Standard Input. You can avoid this problem by always ending your
prompts with a newline ('\n') character so that any input can be entered on its own line.
Alternatively, you can build your program as an SIOW application instead of an MPW tool.
The SIOW library works a little differently, in that if the
insertion point is left on the same line as the last text output, only
the text from the insertion point to the end of the line is passed
to Standard Input. If you move the cursor to another line, or select some
text, then SIOW behaves like the MPW Shell.
- I've built an SIOW application that uses cout to print out a string as follows
cout << "Hello World!";
but the string never appears. What's wrong?
When using cout within an SIOW application, you should terminate each line of output with an endl
to ensure that the buffer is flushed properly. Your line of code should look like the following:
cout << "Hello World!" << endl;
- I've built an application that uses printf() to output data but the data ends up in
a file named "stdout" instead of on the screen. Why?
The printf() and scanf() functions operate on the predefined stdout and stdin file
streams. In a stand-alone Macintosh application, these streams are
implemented as physical files in the Mac's file system. Thus,
anything written to stdout will end up in a file named "stdout".
Conversly, if you have a file named "stdin" in the same
directory as the application, the contents of that file will be used to
satisfy any read requests to the stdin stream.
If you want the more traditional implementation of file streams, you
should build your program as an SIOW application or as an MPW tool.
Debuggers
- Are source level debuggers available for use with MPW?
Three 68K debuggers (SADE, SourceBug, 68K Mac Debugger) and one Power Mac debugger are available
in the
Debuggers folder
on the FTP site.
- How do I obtain documentation about the debuggers?
Reference manuals and release notes are available in the
Documentation folder
on the FTP site. Note: the SADE Reference Manual is not currently available in electronic format.
Installation instructions for the Power Mac Debugger are provided in the "About MPW etc." document
(download).
Pascal
- Is there a Pascal compiler available for use with MPW?
The MPW Pascal compiler has been obsolete since November 1995. The compiler is available to
download,
however, if you plan to use it you should be aware of the following:
It is not supported, it will never be updated, it produces 68K code only, the object files it
produces can only be linked with SC/SCpp object files if the functions implemented in C/C++ use
the "Pascal" calling conventions, and there is no documentation currently available.
- How can I convert Pascal source code to C?
The MPW p2c tool
(download)
can help you translate Pascal source code to C or C++ source code.
Reporting Bugs
- How do I report a bug in MPW?
Active members of the Apple Developer Connection Programs should visit the Apple Developer Connection
Bug Report Submission page
for information on how to submit bug reports. Other developers can report suspected bugs to the
MPW-Dev mailing list
(subscribe) or to the
mpw feedback address.
Please include version numbers and as much detail as possible when reporting problems with
MPW components.
Miscellaneous
- I built a PowerPC program but when I try to run it the Shell reports -
Unable to load code fragment "MrCExceptionsLib" of "programName". What's wrong?
The MrCExceptionsLib runtime library must be installed in order to run a program that uses
MrCpp exceptions. To install the library, either put it in the Extensions folder or in the same
folder as the program that needs it.
- I have a Projector database that may be damaged. How can I check/fix it?
The ProjVerify and DumpDB tools
(download)
can be used to locate any database corruption. You can then use
a file editor to correct any discrepancies. The Projector database format is documented in the
"Understanding ProjectorDBs" document
(download).
![Back to MPW Home Page](images/arw_left.gif)
Back to MPW Home Page
|