Page 1 of 1
Input Line Too Long
Posted: Tue Jan 12, 2010 11:38 am
by fbronx
I've generated a workspace with the Premake tool. It contains a project with a lot of files and when the linker starts I get the following error:
Code: Select all
Input Line Too Long
mingw32-make.exe: *** [../../bin/Debug/glue_wxd.dll] Error 255
Any idea how I can solve this problem?
Re: Input Line Too Long
Posted: Tue Jan 12, 2010 12:13 pm
by eranif
This is a mingw problem. there is a limitation to how much windows allows as input to the command line - you seem to cross that limitation.
The obvious solution is to break your single project into 2-3 projects each producing an archive / dll. if this is too much of an effort, try pasting here
the link line, maybe I will come up with an idea
Eran
Re: Input Line Too Long
Posted: Tue Jan 12, 2010 11:26 pm
by fbronx
I've included the makefile.
Franky
Re: Input Line Too Long
Posted: Wed Jan 13, 2010 10:07 am
by eranif
You are currently genertaing 200 object files, by changing this
into
(note that I appended 'd' to the obj to indicate a 'Debug' objects)
You will be saving a 1000 characters - which should let you "pass" the link line
To change it, open the project settings -> general tab, and change the intermediate directory entry into 'objd/WX'
EDIT:
Another option is to change the directory structure a bit:
All of your files are placed in the makefile relatively to the project file. So each file is prefixed with:
by simply moving the 'src' directory to the project directory, the paths can be changed into:
Eran
Re: Input Line Too Long
Posted: Wed Jan 13, 2010 9:11 pm
by fbronx
I generate my project files into separate directories. I do this to keep the source directories clean from codelite files, VC++ files, make files, ...
I think it's better that the IntermediateDirectory is relative to the project directory and not a source directory.
Code: Select all
../../src/WX/src/$(IntermediateDirectory)/AboutDialogInfoClass$(ObjectSuffix)
would become this:
Code: Select all
$(IntermediateDirectory)/AboutDialogInfoClass$(ObjectSuffix)
Is this possible?
Franky.
Re: Input Line Too Long
Posted: Wed Jan 13, 2010 9:46 pm
by eranif
fbronx wrote:Is this possible?
Nope.
Doing so will prevent codelite from working with projects which has files with the same file name but under different directories.
For example:
path_one/file.cpp
path_two/file.cpp
Using your approach, both object files will be generated under the same intermediate directory so they will override each other which will cause link error.
Using the current approach, this is possible.
Btw, did u try to rename the intermediate directory like I suggested?
Eran
Re: Input Line Too Long
Posted: Wed Jan 13, 2010 11:46 pm
by fbronx
eranif wrote:fbronx wrote:Is this possible?
Doing so will prevent codelite from working with projects which has files with the same file name but under different directories.
For example:
path_one/file.cpp
path_two/file.cpp
Using your approach, both object files will be generated under the same intermediate directory so they will override each other which will cause link error.
Using the current approach, this is possible.
I think it's better to keep projects in separate folders of the workspace folder. Then object files are in separate folders too, so they can't conflict with other projects.
eranif wrote:
Btw, did u try to rename the intermediate directory like I suggested?
Eran
I haven't tried it, but this is a temporary solution, because there are still a lot of classes to add.
Franky.
Re: Input Line Too Long
Posted: Thu Jan 14, 2010 12:47 am
by fbronx
I had hoped that this could help me: I changed the settings for a cpp file into this
Code: Select all
$(CompilerName) $(SourceSwitch) "$(FileFullPath)" $(CmpOptions) $(ObjectSwitch)$(IntermediateDirectory)/$(FileName)$(ObjectSuffix) $(IncludePath)
This makes it possible to get the object files in another folder then the sourcefolder, but it still have problems with defining dependencies and the linker.
Code: Select all
../../src/WX/src/$(IntermediateDirectory)/AboutDialogInfoClass$(ObjectSuffix): ../../src/WX/src/AboutDialogInfoClass.cpp
@makedir "../../src/WX/src/obj/WX/Debug"
$(CompilerName) $(SourceSwitch) "C:/development/GLUEscript/src/WX/src/AboutDialogInfoClass.cpp" $(CmpOptions) $(ObjectSwitch)$(IntermediateDirectory)/AboutDialogInfoClass$(ObjectSuffix) $(IncludePath)
Franky
Re: Input Line Too Long
Posted: Thu Jan 14, 2010 9:10 am
by eranif
fbronx wrote:I think it's better to keep projects in separate folders of the workspace folder. Then object files are in separate folders too, so they can't conflict with other projects.
I agree with you. However, what do you do when you got the same file name under the same project?
fbronx wrote:
I haven't tried it, but this is a temporary solution, because there are still a lot of classes to add.
Even if we will place all the objects under the same directory, it is also a temporary solution, since eventually the linker will complain again (once it will hit its limit). The correct solution is to break your project into sub-projects.
Btw, are you using SVN version of codelite? or an official release?
Eran
Re: Input Line Too Long
Posted: Thu Jan 14, 2010 12:03 pm
by fbronx
I agree with you. However, what do you do when you got the same file name under the same project?
I had this problem when I imported cURL into my source tree and had two files: curl.c and curl.cpp with resulted into the same object file. I solved this problem by renaming my files following the POCO C++ standard (meaning my curl.cpp was renamed into CurlClass.cpp, the suffix Class is because this file implements a JavaScript Class).
Even if we will place all the objects under the same directory, it is also a temporary solution, since eventually the linker will complain again (once it will hit its limit). The correct solution is to break your project into sub-projects.
Can't we use wildcards then?
Btw, are you using SVN version of codelite? or an official release?
I use the latest official release
Franky