Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!decvax!decwrl!pyramid!amiga!stan From: stan@amiga.UUCP Newsgroups: net.micro.amiga Subject: Re: Question about Alink Message-ID: <1174@amiga.amiga.UUCP> Date: Fri, 16-May-86 18:38:57 EDT Article-I.D.: amiga.1174 Posted: Fri May 16 18:38:57 1986 Date-Received: Sat, 17-May-86 05:27:38 EDT References: <928@h-sc2.UUCP> Reply-To: stan@coach.UUCP (Stanley Shepard) Distribution: na Organization: Commodore-Amiga Inc., 983 University Ave #D, Los Gatos CA 95030 Lines: 22 In article <928@h-sc2.UUCP> wen_2@h-sc2.UUCP (A. Wen) writes: > >Is it possible for those of us outside of West Chester and Los Gatos to use >Alink to produce short executables? For example, is it possible to link a >"hello, world" to a less-than-10K executable, and how is this done? I know >it IS done, (look in c: for examples) but can I do it, too? > The problem is that you are linking in the Lattice C run time library. In order to avoid this (and thus have a much smaller hello world) you need to do two things. First link with Astartup (vs. LStartup) and second remove lc.lib from the list of libraries that you link with. While this will achieve the smaller program size, there are a few caveats you be be aware of. 1) Most of the "standard" C functions are not available. 2) Printf is a kludge. Be sure to always use the format %lx or %ld or %l... 3) Use this at your own risk, it is the interface that was around before Lattice C and hasn't beeen touched in ages. Hope this helps.