This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: How to use g++ when paths contain spaces?


--- 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.
> 
> The two main cases are:
> 
> g++ file.cc -I"include dir"
> [usage message for cpp]
> cpp.exe: too many arguments
> 
> or
> 
> g++ file.cc -Iinclude\ dir
> g++: dir: No such file or directory
> 
> I guess quotes are the only way to use spaces in arguments on the Windows
> NT command line. Is there any workaround that will let me use the full
> path names including spaces? I really don't want to use the short 8+3
> names as that would mean rewriting big chunks of my application.

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".
===
YAWIA,
Earnie Boyd <mailto:earnie_boyd@yahoo.com>

Newbies, please visit
<http://www.freeyellow.com/members5/gw32/index.html>
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]