编译的时候提示:输入行太长

http://www.52rd.com/bbs/Archive_Thread.asp?SID=208957&TID=3

编译的时候提示:输入行太长

1、路径太深VS会报错,放到根目录,或者做映射,或者减少项目名目录的长度。

2、可以去C:\WINDOWS\system32\复制cmd.exe到工程本地,再用它来编译。这样应该就不会有这个错误了。

http://forums.codelite.org/viewtopic.php?f=13&t=1972

Well I am pretty sure you met this yourself already, but current trunk does no build for me anymore. The reason is that the file "LiteEditor.txt" passed to make is too long and gets truncated. Therefore, linking fails.

I just wonder how you solved it using current CL 4.1?
SlimFast
 
Posts: 30
Joined: Fri Jun 17, 2011 7:31 am
Top

Re: LiteEditor fails to build (link)

by eranif » Sun Jan 06, 2013 11:40 am

To fix this:
Untick the option: Settings -> Build Settings -> Compilers -> gnu g++ -> 
Advanced -> Pass files to linker via file

Build codelite and run 'update.bat' script

Once you have the new version installed, you can re-enable this option
The problem is that Windows' ECHO command truncates its output to 8191 bytes

It is fixed in trunk by breaking the single ECHO command into number of ECHO calls

Eran
User avatar
eranif
Site Admin
 
Posts: 3122
Joined: Wed Feb 06, 2008 7:29 pm
Top

Re: LiteEditor fails to build (link)

by SlimFast » Sun Jan 06, 2013 12:08 pm

eranif wrote:To fix this:
Untick the option: Settings -> Build Settings -> Compilers -> gnu g++ -> 
Advanced -> Pass files to linker via file

Yes - that did it (I wasn't even aware of that option). Thanks for the fast help!  :-)

Being curious: If passing via file is error prone, why should it be enabled at all? What's the benefit?
SlimFast
 
Posts: 30
Joined: Fri Jun 17, 2011 7:31 am
Top

Re: LiteEditor fails to build (link)

by eranif » Sun Jan 06, 2013 1:38 pm

SlimFast wrote:If passing via file is error prone

Its not. There was a bug in the I implemented the file creation (I used ECHO command in the makefile). 

However, there is a definitely a bug in the command line argument length that g++ can accept - windows limits the length to 16K or something like that.
So passing a single file name instead of passing a very long string which contains hundreds of object file names is the correct way to go

Eran

你可能感兴趣的:(AnGo,android,codelite)