Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!cs.utexas.edu!uunet!iconsys!caeco!i-core!geo-works!bryan From: bryan@geo-works.UUCP (Bryan Ford) Newsgroups: comp.sys.amiga Subject: Re: Lattice Library Question Message-ID: <1165.AA1165@geo-works> Date: 22 Jun 89 02:15:40 GMT References: <690@dsacg2.UUCP> Followup-To: comp.sys.amiga Lines: 50 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" [] "Amiga.lib" [] In you put one of the 'lcm...' libraries, if you're doing floating-point math. In you put one of the 'lc...' libraries. You can put any other libraries you want to use in . 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 \