digitalmars.D - The input line is too long - critical
- Arcane Jill (7/7) Jun 21 2004 I just got this error from the DMD linker: "The input line is too long".
- Matthew (5/12) Jun 22 2004 Isn't this an artefact of the shell, rather than DMC++?
- Matthew (5/12) Jun 22 2004 Does dmd have an @option-file facility? If not, then it should. :)
- Walter (3/4) Jun 22 2004 Yes, it does.
- Walter (10/16) Jun 22 2004 characters -
- Arcane Jill (8/12) Jun 22 2004 Ok, thanks. I'll try that. I assume you mean to just put @filename in th...
- Lars Ivar Igesund (5/11) Jun 22 2004 Actually you need to use lib.exe to make a static library (link.exe
- Walter (7/10) Jun 22 2004 The command line length limit for lib is what the Win32 command prompt s...
- Russ Lewis (13/21) Jun 22 2004 It depends on the type of library you are creating. On Linux, for
- Walter (11/22) Jun 22 2004 link
- Arcane Jill (8/10) Jun 22 2004 That worked 100%. Thanks a bunch.
- Stephen Waits (3/7) Jun 22 2004 It's trivial in SCons as well.
- =?ISO-8859-1?Q?Sigbj=F8rn_Lund_Olsen?= (5/13) Jun 22 2004 640k ought to be enough for anyone.
- Regan Heath (19/29) Jun 22 2004 My link command looks like this..
I just got this error from the DMD linker: "The input line is too long". True, my command line is pretty long - currently it stands at 8482 characters - and is likely to get MUCH longer, as my current (Unicode) project progresses. This is a showstopper. What do I do? And is there any chance that the hard-coded limit on the length of DMD's linker's command line could be lifted? Or at least, increased to something practically unreachable like a megabyte? Arcane Jill
Jun 21 2004
Isn't this an artefact of the shell, rather than DMC++? "Arcane Jill" <Arcane_member pathlink.com> wrote in message news:cb8l5q$ujm$1 digitaldaemon.com...I just got this error from the DMD linker: "The input line is too long". True, my command line is pretty long - currently it stands at 8482 characters - and is likely to get MUCH longer, as my current (Unicode) project progresses. This is a showstopper. What do I do? And is there any chance that thehard-codedlimit on the length of DMD's linker's command line could be lifted? Or atleast,increased to something practically unreachable like a megabyte? Arcane Jill
Jun 22 2004
Does dmd have an option-file facility? If not, then it should. :) "Arcane Jill" <Arcane_member pathlink.com> wrote in message news:cb8l5q$ujm$1 digitaldaemon.com...I just got this error from the DMD linker: "The input line is too long". True, my command line is pretty long - currently it stands at 8482 characters - and is likely to get MUCH longer, as my current (Unicode) project progresses. This is a showstopper. What do I do? And is there any chance that thehard-codedlimit on the length of DMD's linker's command line could be lifted? Or atleast,increased to something practically unreachable like a megabyte? Arcane Jill
Jun 22 2004
"Matthew" <admin stlsoft.dot.dot.dot.dot.org> wrote in message news:cb8m06$1095$1 digitaldaemon.com...Does dmd have an option-file facility? If not, then it should. :)Yes, it does.
Jun 22 2004
"Arcane Jill" <Arcane_member pathlink.com> wrote in message news:cb8l5q$ujm$1 digitaldaemon.com...I just got this error from the DMD linker: "The input line is too long". True, my command line is pretty long - currently it stands at 8482characters -and is likely to get MUCH longer, as my current (Unicode) projectprogresses.This is a showstopper. What do I do? And is there any chance that thehard-codedlimit on the length of DMD's linker's command line could be lifted? Or atleast,increased to something practically unreachable like a megabyte?Two options: 1) Try using a linker response file, i.e. put the command in a file and link it with filename. 2) Put the .obj files into a library, and link in the library.
Jun 22 2004
In article <cb8vnl$1fec$2 digitaldaemon.com>, Walter says...Two options: 1) Try using a linker response file, i.e. put the command in a file and link it with filename.Ok, thanks. I'll try that. I assume you mean to just put filename in the linker command line, instead of files to be linked, options, etc., and move the list of files to be linked, options, etc., into filename. That sounds quite workable.2) Put the .obj files into a library, and link in the library.Well, of course, I can't do that, can I? I can't make a library because I can't use the linker to make it WITH (because the command line is too long). So, I'm going to try option 1. Many thanks for that. Jill
Jun 22 2004
Arcane Jill wrote:Actually you need to use lib.exe to make a static library (link.exe won't do that for you). Maybe lib.exe is able to make use of larger command lines (haven't tried, though). Lars Ivar Igesund2) Put the .obj files into a library, and link in the library.Well, of course, I can't do that, can I? I can't make a library because I can't use the linker to make it WITH (because the command line is too long). So, I'm going to try option 1. Many thanks for that.
Jun 22 2004
"Lars Ivar Igesund" <larsivar igesund.net> wrote in message news:cb990p$1t8b$1 digitaldaemon.com...Actually you need to use lib.exe to make a static library (link.exe won't do that for you). Maybe lib.exe is able to make use of larger command lines (haven't tried, though).The command line length limit for lib is what the Win32 command prompt shell limit is (which varies depending on the version of Windows). But, each time one runs lib one can add to the library, so any long command can be broken up into multiple invocations of lib. Lib can also take a response file that has no arbitrary limit.
Jun 22 2004
Arcane Jill wrote:In article <cb8vnl$1fec$2 digitaldaemon.com>, Walter says...It depends on the type of library you are creating. On Linux, for example, .a libraries (which are used for dynamic linking purposes) are just archives of large numbers of object files. You don't actually link them until runtime. Another possibility is to create several smaller libraries, then link the libraries together. This makes a lot of sense if your program divides up into various different functional parts. I haven't tested it, but I would guess linking a few libraries together is probably faster than linking 100s of object files; thus, you might actually speed your build process this way. If you try it, give us all a holler and tell us how your speed is affected! Russ2) Put the .obj files into a library, and link in the library.Well, of course, I can't do that, can I? I can't make a library because I can't use the linker to make it WITH (because the command line is too long). So, I'm going to try option 1. Many thanks for that.
Jun 22 2004
"Arcane Jill" <Arcane_member pathlink.com> wrote in message news:cb957t$1nlt$1 digitaldaemon.com...In article <cb8vnl$1fec$2 digitaldaemon.com>, Walter says...linkTwo options: 1) Try using a linker response file, i.e. put the command in a file andlinkerit with filename.Ok, thanks. I'll try that. I assume you mean to just put filename in thecommand line, instead of files to be linked, options, etc., and move thelist offiles to be linked, options, etc., into filename. That sounds quiteworkable. Yes. Also, you can break up a line in the response file into multiple lines.can't2) Put the .obj files into a library, and link in the library.Well, of course, I can't do that, can I? I can't make a library because Iuse the linker to make it WITH (because the command line is too long). So,I'mgoing to try option 1. Many thanks for that.The linker isn't used to create a library. Use lib: www.digitalmars.com/ctg/lib.html
Jun 22 2004
In article <cb8vnl$1fec$2 digitaldaemon.com>, Walter says...1) Try using a linker response file, i.e. put the command in a file and link it with filename.That worked 100%. Thanks a bunch. I am /so/ glad I have a custom build script. I was able to change its behavior in a very short space of time, to make it do exactly that. If I'd have been using make instead, I would have been stuck for days trying to get the makefile to get make to do that. Cheers. Jill
Jun 22 2004
Arcane Jill wrote:I am /so/ glad I have a custom build script. I was able to change its behavior in a very short space of time, to make it do exactly that. If I'd have been using make instead, I would have been stuck for days trying to get the makefile to get make to do that.It's trivial in SCons as well. --Steve
Jun 22 2004
Arcane Jill wrote:I just got this error from the DMD linker: "The input line is too long". True, my command line is pretty long - currently it stands at 8482 characters - and is likely to get MUCH longer, as my current (Unicode) project progresses. This is a showstopper. What do I do? And is there any chance that the hard-coded limit on the length of DMD's linker's command line could be lifted? Or at least, increased to something practically unreachable like a megabyte?640k ought to be enough for anyone. Moral: No limit is practically unreachable. Cheers, Sigbjørn Lund Olsen
Jun 22 2004
On Tue, 22 Jun 2004 06:55:54 +0000 (UTC), Arcane Jill <Arcane_member pathlink.com> wrote:I just got this error from the DMD linker: "The input line is too long". True, my command line is pretty long - currently it stands at 8482 characters - and is likely to get MUCH longer, as my current (Unicode) project progresses. This is a showstopper. What do I do? And is there any chance that the hard-coded limit on the length of DMD's linker's command line could be lifted? Or at least, increased to something practically unreachable like a megabyte?My link command looks like this.. d:\D\dmd\bin\dmd.exe -g "$(IntDir)\*.obj" -of"$(OutDir)\$(WkspName).exe" Where $(IntDir) is replaced by the 'intermediate directory' which is where all my obj files get put when I build them. where $(OutDir) and $(WkspName) are replaced with the path and filename of the output executable. The downside to this method being if there are any obj files in the IntDir that I do not need they get linked anyway. But... As this is an VC++ utility project IntDir is actually d:\d\src\<project>\Debug regardless of where I pull the source files from i.e. d:\d\etc\crypto\hash\ d:\d\src\build\ etc So there aren't typically any excess obj files. Which of course means that I also have several copies of tiger.obj, one for each project that includes it, not optimal, but not a huge waste. Regan. -- Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
Jun 22 2004