Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!usc!jarthur!nntp-server.caltech.edu!toddpw From: toddpw@nntp-server.caltech.edu (Todd P. Whitesel) Newsgroups: comp.sys.apple2 Subject: Re: Zaplink Question Message-ID: <1991Mar4.062507.26617@nntp-server.caltech.edu> Date: 4 Mar 91 06:25:07 GMT References: <9103032217.AA18834@apple.com> Organization: California Institute of Technology, Pasadena Lines: 39 STEIN@UCONNVM.BITNET (Alan Stein) writes: >I'm trying to put together my own generic shell, sort of like hodgepodge, >out of small components. So far, I have about six different source files. >When I compiled them, and then tried to link the object files, I got a >"expanding file names made the line too long" message from the Orca Shell. Here's what happens. The linker tries to expand all the names you give it (in case of wildcard and crap like that, I think) and the new length of the line exceeds the internal buffer that's being used for the command line (255 bytes, probably). Shortening your directory names or filenames is the cheap way to get around it. >Is there a limit on the number of files that can be linked? How do I get >around this problem without combining source files? Can object files be >combined prior to linking? Can linking be done in stages? The answer to these questions is no, just a sec, yes, and yes. After you've compiled each source file, use the MAKELIB utility to combine them: makelib -r object.a -l mylib this takes object.a and replaces or adds it to mylib, a LIB file whose name you specify on the linker command line. For instance, compile main.c compile stuff.c compile morestuff.c makelib -r stuff.c -l mylib makelib -r morestuff.c -l mylib link main mylib makelib has more options than r and l, but the above is essentially what I do (with some EXEC's) and it works. Todd Whitesel toddpw @ tybalt.caltech.edu