Disc write error at saving from console
Status: Alpha
Brought to you by:
akouz
saving code from console coase error "cannot open file FVM_code.c for writing in console folder"
fixed by canging
FILE *of = (FILE *)fopen(console_code,"w");
to
FILE *of = (FILE *)fopen("FVM_code.c","w");
in function save_compiled()
(from files.c)
Thank you very much.
The problem vas caused by a bug in the file console_code_fn.c in the console folder. It is a single-line file that describes output file name, it is used by the console.
In the FVM_factory_0_5 the content of the console_code_fn.c is as follows:
const char *const console_code = ".\\FVM_code.c";
The double backslash is a bug. It should be a single backslash:
const char *const console_code = ".\FVM_code.c";
With the single backslash console outputs the compiled script into the file FVM_code.c in the current directory.
However, instead of editing console_code_fn.c file manually, you can use token compiler to fix it. Just compile tokens by FVM_factory.exe, and after that re-compile console. It was the purpose to have a small separate file console_code_fn.c, token compiler updates it with the actual position of the console folder.
Nevertheless, this bug will fixed in the next revision.