nor1675@dsacg2.UUCP (Michael Figg) (06/17/89)
I've been programming with Lattice 'C' off and on for about 2.5 years now, but continually get confused with what libraries need to be linked when. The docs for v5.0 don't seem to say much, except about math libraries. Is there any good information around that discusses this, or could someone run through them. The v5.0 docs seem to cover everything somewhere but if this is there then I haven't found it. Thanks -- "Hot Damn! Groat Cakes Again Michael Figg Heavy on the thirty weight!" DLA Systems Automation Center Columbus, Oh. (614)-238-9036
fgd3@jc3b21.UUCP (Fabbian G. Dufoe) (06/18/89)
From article <690@dsacg2.UUCP>, by nor1675@dsacg2.UUCP (Michael Figg): > > I've been programming with Lattice 'C' off and on for about 2.5 years now, > but continually get confused with what libraries need to be linked when. The > docs for v5.0 don't seem to say much, except about math libraries. Is there > any good information around that discusses this, or could someone run through > them. The v5.0 docs seem to cover everything somewhere but if this is there > then I haven't found it. Thanks Take a look at the Addendum.docs file on disk 5 of your compiler package. Among other things it contains a description of all the files in the LIB: directory. ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: : 12 :::::::::::::::::::Library Descriptions::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: cback.o Startup routine to detach process from CLI and run in background. catchres.o Startup routine to catch software exceptions in resident programs. lcs.lib Lattice C Library for use with 16-bit integers. catch.o Startup routine to catch software exceptions. lcms.lib Lattice Standard IEEE Math Library for use with 16-bit integers. lcm881.lib Lattice 68881 Coprocessor Math Library. c.o Standard Lattice Startup routine. lcnb.lib Lattice C Library for use with no base-relative data addressing. catchresnr.o Startup - Catch Exceptions, Resident, No Requesters on exception. lcmffp.lib Lattice Motorola Fast Floating Point Math Library. lcmieee.lib Lattice IEEE Math Library for use with Commodore Resident Library. lcsr.lib Lattice C Library for use with 16-bit integers and Registerized Parameters. lcr.lib Lattice C Library for use with Registerized Parameters. lcmr.lib Lattice IEEE Math Library for use with Registerized Parameters. lc.lib Lattice Standard C Library. cres.o Startup routine for Resident Programs. lcm.lib Lattice Standard IEEE Math Library. lcsnb.lib Lattice C Library for 16-bit integers and no base-relative addressing. ddebug.lib Commodore debug library for use with Parallel Port. debug.lib Commodore debug library for use with Serial Port. amiga.lib Library of linkage routines to Amiga Resident Libraries. --Fabbian Dufoe 350 Ling-A-Mor Terrace South St. Petersburg, Florida 33705 813-823-2350 UUCP: ...uunet!pdn!jc3b21!fgd3
bryan@geo-works.UUCP (Bryan Ford) (06/22/89)
In article <690@dsacg2.UUCP>, nor1675@dsacg2.UUCP (Michael Figg) writes: >I've been programming with Lattice 'C' off and on for about 2.5 years now, >but continually get confused with what libraries need to be linked when. They don't exactly make it perfectly clear, do they? :-) Maybe this will help: "Blink" ... "library" [<mathlib>] <lclib> "Amiga.lib" [<otherlibs>] In <mathlib> you put one of the 'lcm...' libraries, if you're doing floating-point math. In <lclib> you put one of the 'lc...' libraries. You can put any other libraries you want to use in <otherlibs>. To figure out which of the 'lc...' and 'lcm...' libraries to use, check the compiler options you use. If you use '-w' (16-bit ints), add an 's' to the library name, i.e. lcs.lib or lcms.lib. If you use registerized parameters (-rr or -rb), add an 'r'. There are two other 'lc...' libraries, 'lcnb.lib' and 'lcsnb.lib'. These are the same as the 'lc.lib' and 'lcs.lib' except they are compiled with -b0 (no base-relative data addressing). You normally shouldn't need to use these. There are three other math libraries, 'lcmffp.lib', 'lcmieee.lib', and 'lcm881.lib'. 'lcmffp' causes math functions to use Commodore's fast, single-precision math libraries. 'lcmieee' uses Commodore's double-precision IEEE standard math libraries. 'lcm881' has code that accesses a 68881/68882 math coprocessor directly. I'm not an expert on how these math libraries work, though - I've never used them. Note that this is for the 'standard' environment - You can link in whatever libraries you want in whatever order you want, but ordering IS important, and what you put where can have serious effects on your development environment. So, unless you really know what you're doing, use this template. Well, I hope I've been of some help. Bryan -- ____________________________________________ _/ Bryan Ford - bryan@geo-works.geo-works.com \_ _/ ..!utah-cs!caeco!i-core!geo-works!bryan \_ / ..!uunet!iconsys!caeco!i-core!geo-works!bryan \