compilation under windows [message #101316] |
Sat, 01 May 2004 07:02  |
Eclipse User |
|
|
|
Originally posted by: compuhelp.caramail.com
Hi all
I'm trying to configure eclipse/cdt to compile my C/C++ project
- I've already install CDT in eclipse:
I have the syntax color under my c and cc (cpp) files
so CDT is installed correctly.
- I've already install cygwin:
when I open a consol (cmd.exe), go into my project directory, and tape
'make' my project compile successfully. So cygwin is installed correctly
and my PATH is up to date.
Now I try to compile under cdt, and in the eclipse console, this message
appears:
Error launching builder (make all )
(Exec error:Le nom de répertoire est incorrect.
)
There is a french sentence in this error message, or my eclipse and cdt
are in english so this message comes from my operating system (winXP pro
in french).
"Le nom de répertoire est incorrect."
= the directoy's name is incorrect.
What happens? :/
please help me :)
--
Compu
|
|
|
|
Re: compilation under windows [message #101359 is a reply to message #101327] |
Mon, 03 May 2004 04:43   |
Eclipse User |
|
|
|
This actually is a limitation of command line tools, which usually split
their command line arguments by whitespace. Though, when you enter
paths, you must either escape the whitespace or put it in between "".
Usually, developers, who know of the limitations of their tools, don't
put their workspace/projects in such places. People complaining usually
don't know their tools and never inform themself about the reasons.
(this is my opinion, and only mine, but i'm everytime proofed in this
issue.)
Compuhelp wrote:
> Compuhelp wrote:
>
>> Hi all
>>
>> I'm trying to configure eclipse/cdt to compile my C/C++ project
>>
>> [...]
>>
>> Now I try to compile under cdt, and in the eclipse console, this message
>> appears:
>>
>> Error launching builder (make all )
>> (Exec error:Le nom de répertoire est incorrect.
>> )
>>
>> [...]
>>
>> "Le nom de répertoire est incorrect."
>> = the directoy's name is incorrect.
>>
>
> Ok, I've read the mailing list, and find the solution.
> Under windows, the plugin use short name
> ("C:\Documents and Settings" = "C:\DOCUME~1")
> so when cdt try to compile, there is a pb (in giving the long name).
>
> The solution is to place the project in a directory where all parents
> directories have name less 8 caracters and no spaces. :/
>
> it will be great/nice if we can put our projects where we want
> like in "C:\Program Files\eclipse\workspace" :)
>
>
|
|
|
|
Re: compilation under windows [message #101383 is a reply to message #101371] |
Mon, 03 May 2004 09:37   |
Eclipse User |
|
|
|
manolo@itesm.mx wrote:
> kesselhaus wrote:
>
>> This actually is a limitation of command line tools, which usually
>> split their command line arguments by whitespace. Though, when you
>> enter paths, you must either escape the whitespace or put it in
>> between "".
>
>
> Just for curiosity: any particular reason why cdt does not then escape
> the whitespace or put the file paths in between ""?
>
Paths are used with make-macros. The problem arises, when you do
variable replacements within the Makefile, such as:
PROJECT_PATH = "C:\This is a long path"
LIB_PATH = "And even a lot of spaces"
$(PROJECT_PATH)/$(LIB_PATH)/"does not work.c"
This will not work. The tools and shells (even Windows command line!)
don't accept Paths in the form:
"C:\This is a long path"/"And even a lot of spaces"/"does not work.c"
nor
"C:\This is a long path"\"And even a lot of spaces"\"does not work.c"
You must make yourself realize, that you still work with command line tools!
Btw., there is usually also an limitation of maximum path length and/or
max console input length. Though, why do you want to use such lengthy paths?
Don't you have something else to do then entering such paths? If you
must go once to the console, then you would truly like short paths and
names.
"My lengthy path is just so damn cool and I cannot resist to use such
paths\and I do not have anything else to do then entering such stuff.c".
|
|
|
Re: compilation under windows [message #101396 is a reply to message #101383] |
Mon, 03 May 2004 11:26   |
Eclipse User |
|
|
|
cmd in Windows:
C:\cygwin\home\Profesor TEC CCV>set project="c:\cygwin\home\Profesor TEC
CCV"
C:\cygwin\home\Profesor TEC CCV>echo %project%
"c:\cygwin\home\Profesor TEC CCV"
C:\cygwin\home\Profesor TEC CCV>set milib="mi libreria"
C:\cygwin\home\Profesor TEC CCV>g++ %project%/%milib%/main.cpp
C:\cygwin\home\Profesor TEC CCV>
bash under cygwin in Windows:
Profesor TEC CCV@IBM-9BF7195F3E0 ~
$ export project=`pwd`
Profesor TEC CCV@IBM-9BF7195F3E0 ~
$ export milib="mi libreria"
Profesor TEC CCV@IBM-9BF7195F3E0 ~
$ g++ "$project/$milib/"main.cpp
Profesor TEC CCV@IBM-9BF7195F3E0 ~
$ echo $project
/home/Profesor TEC CCV
Profesor TEC CCV@IBM-9BF7195F3E0 ~
$ echo $milib
mi libreria
Profesor TEC CCV@IBM-9BF7195F3E0 ~
$
kesselhaus wrote:
> manolo@itesm.mx wrote:
>
>> kesselhaus wrote:
>>
>>> This actually is a limitation of command line tools, which usually
>>> split their command line arguments by whitespace. Though, when you
>>> enter paths, you must either escape the whitespace or put it in
>>> between "".
>>
>>
>>
>> Just for curiosity: any particular reason why cdt does not then escape
>> the whitespace or put the file paths in between ""?
>>
>
> Paths are used with make-macros. The problem arises, when you do
> variable replacements within the Makefile, such as:
>
> PROJECT_PATH = "C:\This is a long path"
> LIB_PATH = "And even a lot of spaces"
>
> $(PROJECT_PATH)/$(LIB_PATH)/"does not work.c"
>
> This will not work. The tools and shells (even Windows command line!)
> don't accept Paths in the form:
>
> "C:\This is a long path"/"And even a lot of spaces"/"does not work.c"
>
> nor
>
> "C:\This is a long path"\"And even a lot of spaces"\"does not work.c"
>
>
> You must make yourself realize, that you still work with command line
> tools!
>
> Btw., there is usually also an limitation of maximum path length and/or
> max console input length. Though, why do you want to use such lengthy
> paths?
> Don't you have something else to do then entering such paths? If you
> must go once to the console, then you would truly like short paths and
> names.
>
>
> "My lengthy path is just so damn cool and I cannot resist to use such
> paths\and I do not have anything else to do then entering such stuff.c".
>
>
>
|
|
|
Re: compilation under windows [message #101411 is a reply to message #101383] |
Mon, 03 May 2004 11:27  |
Eclipse User |
|
|
|
/kesselhaus/:
> Paths are used with make-macros. The problem arises, when you do
> variable replacements within the Makefile, such as:
>
> PROJECT_PATH = "C:\This is a long path"
> LIB_PATH = "And even a lot of spaces"
PROJECT_PATH=C:\This is a long path
LIB_PATH=And even a lot of spaces
> $(PROJECT_PATH)/$(LIB_PATH)/"does not work.c"
"%PROJECT_PATH%\%LIB_PATH%\does work.c"
> This will not work. The tools and shells (even Windows command line!)
> don't accept Paths in the form:
>
> "C:\This is a long path"/"And even a lot of spaces"/"does not work.c"
"C:\This is a long path\And even a lot of spaces\does work.c"
--
Stanimir
|
|
|
Powered by
FUDForum. Page generated in 0.08596 seconds