[net.micro.mac] Megamax C and include problems

mo@seismo.CSS.GOV (Mike O'Dell) (10/20/85)

I am using Megamax C 2.1 and am having all kinds of problems with
a bloody include file.  This code compiles on 5 other C compilers
on Vaxes, 2 different 68K Unix boxes, and under 2 different MS-DOS
compilers.  The offending line reads

	#include "instr.h"

It claims:

"Src Disk:mumble1.c", line 25: Can't find include file Src Disk:instr.h

Well, it is certainly there.  I even tried a different short program
"foo.c" which reads

	#include "instr.h"

and get no complaints.  Further, several other files generate this complaint
(each one that includes "instr.h").  The include is actually bracketed
with an 
	#ifndef INSTRdefined
	#include "instr.h"
	#endif

I thought there might be  mutual recursion problem but (1) none of the
other compilers found it and (2) a different test program correctly
diagnosed mutually recursive include files.  

I went out to the finder and made a copy, threw away the original, and
then renamed the copy to instr.h, all to no avail.

This is more that a little annoying.  Why is it so damnably difficult
to get anything done??

	Would Kill for a Shell,
	-Mike O'Dell

vishniac@wanginst.UUCP (Ephraim Vishniac) (10/21/85)

> I am using Megamax C 2.1 and am having all kinds of problems with
> a bloody include file.  This code compiles on 5 other C compilers
> on Vaxes, 2 different 68K Unix boxes, and under 2 different MS-DOS
> compilers.  The offending line reads
> 
> 	#include "instr.h"
> 
> It claims:
> 
> "Src Disk:mumble1.c", line 25: Can't find include file Src Disk:instr.h
> 
> ...

In all seriousness, try deleting and retyping the line.  When a compiler
or assembler gives me sh*t like this, the answer is usually an invisible
character in the line.  Different systems, of course, do different
amounts of filtering on funny characters, which could account for the 
differing results.
-- 
Ephraim Vishniac
  [apollo, bbncca, cadmus, decvax, harvard, linus, masscomp]!wanginst!vishniac
  vishniac%Wang-Inst@Csnet-Relay

lewis@axiom.UUCP (Lewis Gordon Pringle Jr.) (10/23/85)

There is a DOCUMENTED, though annoying feature of the Megamax compiler, that
nesting of include files cannot exceed 5 (or six, or something). 
Unfourtunatly,  in keeping with the quality standards of error messages that
that have established in other areas, the way in which the problem is reported
is by saying cannot find file ....

Check to see how that file "initstr.h" was included.  Was it from another
include file ???

						Merry Christmas,
								Lewis.

PS:
	I suspect the reason behind the problem is the mac limit on the
number of open file descriptors.  Sadly, if you munge the bootblocks number
of open file descriptors, you get no extra include file nesting.  This pisses
me off.


-- 

----------
The facts expressed herein are subject to change without notice ...

UUCP:	{humming,linus,harvard,security}!lewis@axiom.UUCP