• Updated 2023-07-12: Hello, Guest! Welcome back, and be sure to check out this follow-up post about our outage a week or so ago.

MPW Question

equant

Well-known member
I'm trying to use MPW for the first time. I'm trying to compile some source-code from Mac Tech. It's an MPW project, but the makefile calls for C, and in my MPW tools folder I don't have C, I have MrC and SC.

I changed the C to SC and it complains that it can't find a included file. That file is in the directory with the rest of the project.

So I'm curious, is 'C' a different tool than SC? if so, where can I DL it? My other question is... how do I get MPW to see the header file that's right there? I've set the default directory to the folder that everything is sitting in.

Any ideas?

Thanks.

 

porter

Well-known member
MPW switched to using Symantec C from "MPW C" around MPW 3.4/3.5.

I've never used "MPW C" before but have used "Lightspeed C 3.0", "THINK C 5.0", "Symantec C++ 7.0" and MPW's SC and MrC.

Use the "-i" directive to specify the include files. Also some projects can be picky over the difference between

Code:
#include "
and

Code:
#include "foo.h"
With MPW it is useful to understand how Macintosh file paths work....

(a) if no colons it's a relative path

( B) if a leading colon, it's a relative path

© if it contains colons but no leading colon it's an absolute path

(d) double colon means parent folder

The convention for a variable that holds a directory is to have the trailing : appended.

 

porter

Well-known member
Don't forget to type

Code:
help
Code:
help languages
Code:
help sc
I'm still trying to decide on whether to use "Link" or "ILink" for 68k code. :)

 

II2II

Well-known member
It has been way too long since I've used MPW to give you a definitive answer on how to fix this, but I can give you a few breadcrumbs:

Yes, it is possible to change the compilers in MPW. If you are dealing with a new version of MPW and old MacTech articles, then the compilers definitely would have changed.

From what I recall, library and include paths were passed to the program via command line options that are in the makefiles. These paths are usually passed as environment variables, so you will have to find out how to query their contents and how to change them.

 

porter

Well-known member
An excellent gotcha with THINK C is that you can specify additional include paths by adding an alias inside one of THINK C's include directories.

However, that does not help me much on System 6.0.8.... :)

 

Kallikak

Well-known member
I'd recommend looking at the makefile to determine dependencies, then using the standard MPW build scripts to create a new makefile (from the Build menu). These tools are easy to use, and you will end up with a makefile appropriate for the compiler you have installed.

 
Top