From: SourceForge.net <no...@so...> - 2007-04-30 18:16:06
|
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: Documentation >Group: fixed >Status: Closed >Resolution: Fixed Priority: 5 Private: No Submitted By: Steve (neobelerophon) >Assigned to: Borut Razem (borutr) 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-30 20:16 Message: Logged In: YES user_id=568035 Originator: NO Fixed in svn revision #4782: documented how to use paths with spaces for Windows users. Borut ---------------------------------------------------------------------- Comment By: Borut Razem (borutr) Date: 2007-04-29 23:16 Message: Logged In: YES user_id=568035 Originator: NO > I doubt there are many native dos/win programs that can handle unix paths. > But if you say it works, I do not question that, even though I've never > heard of it. Unix paths are handled on the lowest WIN32 API level. If the application code doesn't corrupt them, they work "out of the box". An other thought: the average Windows user doesn't know anything about the DOS prompt, so using the command line utilities is a rocket science for him. I think that SDCC user's knowledge is a little bit more advanced... > But that doesn't take away my other option, documentation. Teaching users > is not done in bugs obscured by closure. Will you please add this to the > manual? I definitely agree with you abut that. I'll try to find the appropriate place where to document it. So I'll reopen the bug until the docummentation is updated. Borut ---------------------------------------------------------------------- Comment By: Maarten Brock (maartenbrock) Date: 2007-04-29 22:51 Message: Logged In: YES user_id=888171 Originator: NO Borut, I just remembered, instead of putting the backslash inside the quotes you can put it after the quotes. Like this: sdcc.exe -c test.c -o "F:\Projects\test3\output 1"\ This also works with command line completion in cmd.exe as you have to add a backslash after every directory there yourself too if you want to browse into it. Try typing: 'dir c:\pro[TAB]\sd[TAB]\bin' and it shows 'dir c:\Program Files\SDCC\bin' I doubt there are many native dos/win programs that can handle unix paths. But if you say it works, I do not question that, even though I've never heard of it. The same goes for escapes. Anyway I thought there would have been an easy way to get the command line argument as typed, but that doesn't seem to be the case. But that doesn't take away my other option, documentation. Teaching users is not done in bugs obscured by closure. Will you please add this to the manual? Maarten ---------------------------------------------------------------------- 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 |