www.delorie.com/djgpp/faq/command-line/longest.html   search  
What is the longest command line I can pass to gcc when it is invoked by Make?

The arguments are passed to DOS Exec call (Int 21h function 4Bh) via the transfer buffer which is 4KB-long. Apart of the command line, it is also used to pass a full path of go32 executable (variable, but should be less than, say, 100 characters), 32 characters of !proxy parameters, 1-byte command-line character count and a CR trailing character required by DOS, and the copy of the environment for the child program (let's say, less than 2000 bytes in most cases, but your mileage may vary). This leaves at least 1800 bytes for arguments (including a separating blank between any two arguments). So unless your arguments span more than 20 screen lines (1600 characters), you shouldn't worry.

On the other hand, if you run make to link a very large number of object files, it can be that the linker only gets a partial list of them, and fails. This was reported to happen when linking GhostScript.

  webmaster     delorie software   privacy  
  Copyright © 1995     Updated Feb 1995