[comp.sys.mac.programmer] Think C link error revisited.

jenlan@eos (Jennifer S Lanham) (01/11/90)

Let me rephrase a problem I posted a day ago.
I have Think C 4.0. A program I have was not
originally for the Mac. I have added the ANSI
library to the project. I have also #included
the necessary header files. After compilation, I
get the link error message:
	'_file' not defined.

The definition is in miscio.c. I tried rebuilding ANSI
(maybe it was corrupted??) No dice.  

ANSI works fine in other projects I have.

Some sort of problem with the size of the program module, 
segment, or project is about the only other thing I can
think of. But I do not know the exact nature of any
size errors.

Has any one had this, or other unlikely link errors??
Did you solve the problem?

Post, or E-mail is fine.

Thanks for any help.  I am about ready to call on Techies
at Symantec...

Jennifer Lanham
jenlan@eos.arc.nasa.gov

chuq@Apple.COM (Chuq Von Rospach) (01/11/90)

jenlan@eos (Jennifer S Lanham) writes:

>the necessary header files. After compilation, I
>get the link error message:
>	'_file' not defined.

'_file is an undocumented (and unsupported) internal variable in many
flavors of stdio. It's generally used to help folks figure out how many open
files they can have.

The program depends on a common, but not guaranteed (or
standard) part of the stdio library. It's not Think's fault that it isn't
there, and you should modify the program so it doesn't use it because it's
not a portable variable.

You'd see the same error porting to some releases of SunOS, for instance.

-- 

Chuq Von Rospach   <+>   chuq@apple.com   <+>   [This is myself speaking]

The contest is over. Six people got the correct answer. The interesting
thing was the reaction to a list of names. You'd almost think that I'd said
something negative about them -- which I didn't. The reasons for the list
were left to the imagination -- on purpose. The reactions were amusing.