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

125 篇文章 0 订阅
10 篇文章 0 订阅

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)

Postby 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)

Postby 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)

Postby 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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值