[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem Installing Orca/C 1.3 - Unresolved Reference Label



William H. Squires writes

>   Yes, and no. No; the compiler doesn't care about the libraries -- it simply
> passes its symbol table (in the =.ROOT & =.A[B,C,...] files) to the linker.
>   Yes, the linker does care about the order. The linker takes two passes
> through the object files, reading the libraries during one. Since it is 
> faster to search in memory, the linker doesn't make extra passes through the
> libraries on disk, since they might be on a 3.5". If it did, the order
> wouldn't matter. Because it doesn't though, the libraries have to be in the
> correct order so that inter-library references can be resolved. The problem
> could also be solved with another pass through the object files, but this
> is a bad tradeoff.

	Thats a lazy way of looking at it... "Gee, since the compiler loads,  
=.ROOT and +.A[B,C,...] into memory, then the order has to be important because  
of speed reasons." Its a sloppy design when the compiler insists on the  
libraries being in a specific order. A simple solution would be to read in the  
directory, sort the libs according to priority, and THEN load them in... No  
significant loss in speed there since it has to load in the filenames  
already... However, the stupid algorithm for loading in the libraries is not a  
valid case for justifing the importance of library order.


| Hal Bouma                            | Send mail to: HBouma@Macalstr.edu    |
| Macalester College, St. Paul, MN.    | and           HBouma@Macalstr.Bitnet |
 \  Things that make you go Hmmm:  System 6, GNO, DreamGrafix, SoundMeister  /
  \  Coming sometime this decade for the //GS : NBA! (GNO compatible too!)  /
   \  Drop by and say hi to us anytime on the #AppleIIGS channel on IRC!!  /