[comp.sys.ibm.pc] DOS I/O

jlfox@cisunx.UUCP (James L Fox) (03/13/89)

Can someone tell me how to lift the 128 character command line length
limit to PC/MS DOS?  I hit the limit with Microsoft C and a many filed
program.  I hope I don't have to combine groups of files into libraries
to avoid a CL or LINK command exceeding 128 characters!

Thanks,
Jim Fox
p.s.  If this is a dumb question for msdos pros,
      bore only me at an address below. :-)

      jlfox@pittvms.bitnet
      jlfox@unix.cis.pittsburgh.edu
      jlfox@vms.cis.pittsburgh.edu
      {decwrl!allegra,bellcore,cadre,psuvax1}!pitt!cisunx!jlfox

pfales@ttrde.UUCP (Peter Fales) (03/14/89)

In article <16660@cisunx.UUCP>, jlfox@cisunx.UUCP (James L Fox) writes:
> 
> Can someone tell me how to lift the 128 character command line length
> limit to PC/MS DOS?  I hit the limit with Microsoft C and a many filed
> program.  I hope I don't have to combine groups of files into libraries
> to avoid a CL or LINK command exceeding 128 characters!

As far as I know the way to work around this is using response files.  In
other words, your makefile simply contains the command

LINK @foo.bar

and foo.bar contains the parameters to link and may be as verbose as
necessary.

An even nicer way is to use NDMAKE (available as shareware from BBS's).
It is MUCH nicer than the Microsoft's make (very unix-like) and one
of it's great features is the ability to create response files
automatically.  Your makefile contains something like

file.exe: $(OBJ)
	link $(OBJ)

and if "link $(OBJ)" is longer than 128 chars, the appropriate response
file is created, link runs, and the response file is deleted.

(It was the [accidental, I was too lazy to RTFM] discovery of this feature
that caused me to immediately send in my registration dollars.)

Disclaimer:  I have no connection with the authors of NDMAKE, just a
VERY satisfied user.

-- 
Peter Fales			AT&T, Room 2F-217
				200 Park Plaza
UUCP:	...att!ttrde!pfales	Naperville, IL 60566
Domain: pfales@ttrde.att.com	work:	(312) 416-5357		

kneller@cgl.ucsf.edu (Don Kneller) (03/16/89)

In article <16660@cisunx.UUCP> jlfox@cisunx.UUCP (James L Fox) writes:
>
>Can someone tell me how to lift the 128 character command line length
>limit to PC/MS DOS?  I hit the limit with Microsoft C and a many filed
>program.  I hope I don't have to combine groups of files into libraries
>to avoid a CL or LINK command exceeding 128 characters!

For CL, you can use the "CL" environment variable to hold the compiler
flags.  For LINK, you have to use a response file (i.e. link @file,
where file contains the actual link commands).

- don
-----
	Don Kneller
UUCP:		...ucbvax!ucsfcgl!kneller
INTERNET:	kneller@cgl.ucsf.edu
BITNET:		kneller@ucsfcgl.BITNET