[comp.sys.mac] Weird Thingy with LSC 2.15

thompson@uxf.cso.uiuc.edu (01/15/89)

Interesting LSC happening (bug?):

I've been working on a little DA project in Lightspeed C 2.15 for about
a week now, and have been having no problems.  Until two days ago.
After adding a bunch of little routines to access the serial port,
I suddenly got a *mysterious* bunch of 26 Link Errors, telling me that
everything from "printf" to "fopen" was undefined.

The interesting part is that I never called them.  I am not using the
stdio library, managing to make do (for brevity's sake) with MacTraps
and strings.  Well, I figured I may have accidentally included stdio.h
somewhere, but no, it wasn't there.  And none of the functions shown as
undefined were found *anywhere* in my included files, my header files, or
my source files.  Puzzled, I began Removing source files, one by one, trying
to nail the problem down to one.  No go!  In fact, and here's what clued me
in to the eventual solution, even narrowing the project down to one
source code file I *hadn't modified since last make* left me with the
stdio linking problems.  Completely puzzled, I finally Closed the project
and opened a new one, Adding to it all the source code and libraries
the old project had.  It linked without a whimper.  I have *no* idea
what this could possibly be -- anyone got a clue?

Notes:
  I am running System 4.3 on a 1 Meg Mac SE, overflowing with INITs.
  I have never seen this problem or its like anywhere.
  Not all of the mysterious link problems were from stdio (though 23 of the
   26 were) - getpid was also claimed as undefined!!
  I still have both projects - the original still won't link, the new one
   (with the *same* files) works fine.
  I am aware of LSC 3, but have neither the money nor the memory to expend
   some of my rather scarce cash on such a purchase.  Is this
   a bug that's "fixed in 3.0"?

Just curious now, but still puzzled...

- Mark Thompson                       "The University Neither Knows Nor
   released on my own recognizance      Cares What I Am Saying -- Lucky
   from a Hell of my own device         Them."
  University of Illinois at U-C

  ARPANET: thompson@uxf.cso.uiuc.edu
  USMAILNET: 202 E Springfield #3B, Champaign IL 61820