[sdcc-devel] [ sdcc-Bugs-1669175 ] Problem with space in output
paths

Bugs item #1669175, was opened at 2007-02-26 15:55
Message generated for change (Comment added) made by borutr
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1669175&group_id=599
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Build system
Group: non bugs
Status: Closed
Resolution: Works For Me
Priority: 5
Private: No
Submitted By: Steve (neobelerophon)
Assigned to: Nobody/Anonymous (nobody)
Summary: Problem with space in output paths
Initial Comment:
If you specifie an output path with -o and this path contains a space even if it's written with brackets it returns an error.
F:\Projects\test3>sdcc.exe -c test.c -o "F:\Projects\test3\output 1\"
test.c:11: error 4: 'fopen' failed on file 'F:\Projects\test3\output 1".asm'
sdcc.exe -v
SDCC : mcs51/gbz80/z80/avr/ds390/pic16/pic14/TININative/xa51/ds400/hc08 2.6.0 #4
309 (Jul 28 2006) (MINGW32)
----------------------------------------------------------------------
>Comment By: Borut Razem (borutr)
Date: 2007-04-29 22:17
Message:
Logged In: YES
user_id=568035
Originator: NO
Maarten,
this time I don't agree with you: what you call "unix-style paths" are
also win32 paths: majority (if not all?) of Windows applications accept
them (you can try with Notepad...). Sometimes you have to surround the path
with quotes, so that the application don't mess them with command line
options starting with "/". This worked on DOS too if the application didn't
break it...
Escapes are also handled by cmd.exe and were also in DOS times by
command.com.
I think that we should teach the users that they exist and how to use
them.
After all, what do you think is the right solution? To fix cmd.exe ;-) ?
Borut
----------------------------------------------------------------------
Comment By: Maarten Brock (maartenbrock)
Date: 2007-04-29 21:46
Message:
Logged In: YES
user_id=888171
Originator: NO
Borut,
I think it's counter-intuitive for win32 users to have to use unix-style
paths or escapes to make this work. One never needs escapes on win32 paths.
This is also not documented behaviour. This is what I call a workaround.
I usually do not want to go against an administrator but I strongly
suggest to reopen this bug.
Maarten
----------------------------------------------------------------------
Comment By: Borut Razem (borutr)
Date: 2007-04-29 19:07
Message:
Logged In: YES
user_id=568035
Originator: NO
The proper soultion is:
sdcc.exe -c test.c -o "F:\Projects\test3\output 1\\"
so that the ending backslash is escaped and the ending quote does it's
usual job; or simply
sdcc.exe -c test.c -o "C:/Projs/test3/output 1/".
In both cases the otput files are created in "output 1" directory.
Borut
----------------------------------------------------------------------
Comment By: kosmonaut_pirx (kosmonaut_pirx)
Date: 2007-03-04 13:50
Message:
Logged In: YES
user_id=1411903
Originator: NO
just tried
sdcc-snapshot20070304/bin/sdcc --stack-loc 0x044F --data-loc 0x0050
--xram-loc 0x0100 --model-large --nooverlay -I. -mhc08 --out-fmt-s19
--verbose -V --debug -o "bla fasel.s19" *.rel
without any problem on fedora core 6.
my suggestion is to close this. it's most likely an user error.
----------------------------------------------------------------------
Comment By: Steve (neobelerophon)
Date: 2007-02-27 08:19
Message:
Logged In: YES
user_id=1689471
Originator: YES
I tested it without the last backslash an got an output file named output
1
also tried the unix style with slashes and got same result.
----------------------------------------------------------------------
Comment By: Maarten Brock (maartenbrock)
Date: 2007-02-26 22:13
Message:
Logged In: YES
user_id=888171
Originator: NO
I doubt that is the right solution. Without the last backslash it's a
filename to SDCC instead of a directory.
So how about providing the full path including the filename: -o
"F:\Projects\test3\output 1\test.rel"
Or try to use unix-style seperators: -o "F:/Projects/test3/output 1/"
----------------------------------------------------------------------
Comment By: Raphael Neider (tecodev)
Date: 2007-02-26 16:52
Message:
Logged In: YES
user_id=1115835
Originator: NO
> sdcc.exe -c test.c -o "F:\Projects\test3\output 1\"
You must not escape the closing qoute, try
sdcc.exe -c test.c -o "F:\Projects\test3\output 1"
Note: no backslash after test3\output 1
HTH,
Raphael
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100599&aid=1669175&group_id=599