red
red copied to clipboard
Compiler: `#include file` with absolute path of file including other files, wont find included files
Let's work in path /dev/.
Let's have file %test.red with content:
Red []
#include %/git/red/red/environment/console/console.red
now try to compile it:
% red -r -c test.red
-=== Red Compiler 0.6.1 ===-
Compiling /dev/test.red ...
*** Compilation Error: include file not found: input.red
*** in file: /dev/test.red
*** near: [
#include %input.red
#include %help.red
#include %engine.red
system/console/launch #pop-path
]
Now the same with a relative path:
Red []
#include %../git/red/red/environment/console/console.red
compile:
% red -r -c test.red
-=== Red Compiler 0.6.1 ===-
Compiling /dev/test.red ...
...compilation time : 226 ms
Target: Darwin
Compiling to native code...
...compilation time : 2480 ms
...linking time : 98 ms
...output file size : 163840 bytes
...output file : /dev/test
No problem :-) (tested on macOS and Linux)
Does it work if you compile with -r instead of -c? Current console code contains a lot of R/S code, so it can't be properly compiled with just -c.
It doesn't. BTW I did a red -u .. before and LibRT really makes debugging faster! Kudos! 👍
Same issue on Linux