This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: How to use g++ when paths contain spaces?
- To: Earnie Boyd <earnie_boyd@yahoo.com>
- Subject: Re: How to use g++ when paths contain spaces?
- From: Pontus Lidman <pontus@mathcore.com>
- Date: Tue, 15 Jun 1999 08:59:55 +0200 (CEST)
- cc: cygwin@sourceware.cygnus.com
On Mon, 14 Jun 1999, Earnie Boyd wrote:
> --- Pontus Lidman <pontus@mathcore.com> wrote:
> > Hello,
> >
> > I can't seem to get my command lines or makefiles right when the path to
> > my include directories contain spaces.
[snip]
>
> Character quoting using the DOS shell uses the ^ character. If you execute
> your commands in the bash shell the you can use the \ character.
>
> I as a manager wouldn't ever allow a space in a directory or file name. It
> causes too many headaches. The FAQ also warns of the dangers of the space in
> file names. I suggest that you modify the spaces to _ or -. Or in the case of
> "include dir" change it to "include".
I totally agree about spaces in path names, but for a variety of reasons I
need to access files from another application that the user might
have installed under "Program Files".
I tried using ^ to escape spaces but it doesn't seem to work the way I
hoped it would:
int main(int argc,char **argv) {
int i;
for (i=0; i<argc; i++) printf("'%s'\n",argv[i]);
}
c:\temp>a.exe a^ b
a.exe a^ b
'a.exe'
'a'
'b'
c:\temp>a.exe "a b"
a.exe "a b"
'a.exe'
'a b'
I had hoped these examples would give the same output.
I also gathered that the mingw32 port of 'make' would call sh.exe (if
available) to execute its command lines, so I tried putting the cygwin
sh.exe in the mingw32 bin directory and used standard sh quoting, but I
still got the same behaviour as before.
I guess I lose?
Regards,
Pontus Lidman
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com