While changing laptops, installed the latest Win32 self-installing Gforth 0.6.2, and programs promptly stopped loading, giving file I/O errors. (Under Win XP Pro). As used the previous 0.6.2 self-install with no problems, it on old drive, and when replaced the new cygwin1.dll (1,114K, 2004-08-01) with the old one (949K, 2003-08-30), everything was fine again. The symptom is that INCLUDED cannot load any file that has directory specifiers in the name. If S" test1.f" INCLUDED, and the file is in the current directory, it works, but if the command is S" /elko/work/forth/new-oof/test1.f" INCLUDED, it fails. (It fails with both dir separators, / and \, while INCLUDE works with the DOS standard \ separator only). A1: If it is not a bug in cygwin, then it is definitely a bug in Gforth. An it IS a bug, because it prevents including files with fully properly specified names. I am not 100% sure, but I think it comes from the fact that absolut-path? in paths.fs does not consider \ to be an absolute path prefix (which it is, in Win/DOS). See what happens as a result of this:--------------------------------------------------------------------- Gforth 0.6.2, Copyright (C) 1995-2003 Free Software Foundation, Inc. Gforth comes with ABSOLUTELY NO WARRANTY; for details type `license' Type `bye' to exit s" \elko\work\forth\new-oof\2b-run.f" included redefined >order in file included from *the terminal*:1 elkoworkforthnew-oof2b-run.f:3: File I/O exception uses evolutionary-programming ^^^^^^^^^^^^^^^^^^^^^^^^ Backtrace: $4B7AB20 throw $4B9E1DC included $4B9E5C4 #included $4B9DB4C execute $4B7DC08 $4B9DD94 execute ofile count type /usr/local/share/gforth/0.6.2/\elko\work\forth\primitin.f ok s" \elko\work\forth\new-oof\2b-run.f" absolut-path? . 0 ok s" /elko/work/forth/new-oof/2b-run.f" absolut-path? . -1 ok ---------------------------------------------------------------------- Obviously, Gforth prepends crap to the beginning of a fully specified filename. And notice that it has the wrong slashes for this version of cygwin, so even if it needed to prepend, it wouldn't work. What I don't understand is why this happens on the second include. (Inside 2b-run.f there is another INCLUDED with just a filename, in the current directory, and that works well - Gforth properly prepends \elko\work\forth\new-oof, and even though it adds the wrong slash - /, cygwin swallows the resulting mixed name \elko\work\forth\new-oof/resources.f without a problem. I would suggest changing absolut-path? to recognize '\ as a valid full-path specifier. A2:I have cygwin. First of all, I don't necessarily agree that backslashes should be used in Cygwin as file path separators. Most other software running on Cygwin uses forward slashes *only*. If you need to refer to an absolute Windows path, you can, foe example, on the "V:" drive use/cygdrive/v/gforth. Second, if you insist on using backslashes, try doubling them. The rules under which Cygwin interprets backslash as an escape character in most cases will consume one of them. So, try V:\gforth |
< Prev |
---|
Join the Discussion:
Got computer error message like:
"dll crash"
"bad image"
"error loading"
"Dll was not found"
"the procedure entry point Dll error"
"Dll could not be located"
"Access Violation"
"Cannot register Dll"
at startup or shutdown or run program?
No "missing dll" anymore - Repair dll errors - How to fix windows dll corrupt on your windows xp,vista,2000/2003,win7, win8,win10