[Coco] C progs under Nitros9

Gene Heskett gene.heskett at verizon.net
Sun Aug 5 17:13:39 EDT 2007


On Sunday 05 August 2007, Bob Devries wrote:
>Paul,
>The way to create a library (*.l) file is to compiler your source files to
>the relocatable file stage (*.r), and then merge the files together to form
>a *.l file. You do need to make sure that the order of the files in the
>library file is correct; i.e. that no *.r file calls another towards the
>beginning of the file.

Actually, I couldn't fully satisfy this requirement when I was merging the 
trig.l that was published as public domain in the rainbow all those years 
ago.  The net result to get a working trig.l was to append another copy of 
the backwards reference until everything was satisfied.  Sorta kludgy, but it 
worked for many years.  It may have been possible to re-order the merge and 
satisfy everything, but I spent about 5 hours one night remaking it and doing 
test compiles before giving up and adding the duplicates.  Sometimes, in 
moving the missed reference to a later position in the list than the 
complainer would generate 2 or 3 more errors that were seemingly unrelated.  
So I took the chicken way out at the time.  With then, a 120 megabyte drive, 
disk space for the bloated library was cheap.

IMO c.link should have been capable of hitting the end of the library file 
without satisfying the dependencies, at which point it should have set a 
flag, did a seek to the start and rescanned the library file, and if it hit 
EOF again with the flag set, then and only then should it have taken the 
error exit, suitably noisily.  But the easy way was quicker, making the 
effort to do the correct fix difficult to justify.

-- 
Cheers, Gene
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author)
This dungeon is owned and operated by Frobozz Magic Co., Ltd.



More information about the Coco mailing list