digitalmars.D.learn - dmd and string imports on Windows
- Atila Neves (14/14) Jun 10 2015 On Linux:
- Yuxuan Shui (3/17) Jun 10 2015 I have encountered this as well, don't know if it's a bug or
- Baz (6/20) Jun 10 2015 There is already a bug report for this problem:
On Linux:
foo.d:
import std.stdio;
void main() { writeln(import("dir/bar.txt")); }
On Windows:
Error: file "dir/bar.txt" cannot be found or not in a path
specified with -J
I tried the obvious buildPath("dir", "bar.txt") instead and now:
Error: file "dir\\bar.d" cannot be found or not in a path
specified with -J
I tried r"dir\bar.txt" and "dir\\bar.txt" and still nothing. What
am I supposed to do? Thanks,
Atila
Jun 10 2015
On Wednesday, 10 June 2015 at 19:59:17 UTC, Atila Neves wrote:
On Linux:
foo.d:
import std.stdio;
void main() { writeln(import("dir/bar.txt")); }
On Windows:
Error: file "dir/bar.txt" cannot be found or not in a path
specified with -J
I tried the obvious buildPath("dir", "bar.txt") instead and now:
Error: file "dir\\bar.d" cannot be found or not in a path
specified with -J
I tried r"dir\bar.txt" and "dir\\bar.txt" and still nothing.
What am I supposed to do? Thanks,
Atila
I have encountered this as well, don't know if it's a bug or
intended. My workaround is to pass -Jdir
Jun 10 2015
On Wednesday, 10 June 2015 at 19:59:17 UTC, Atila Neves wrote:
On Linux:
foo.d:
import std.stdio;
void main() { writeln(import("dir/bar.txt")); }
On Windows:
Error: file "dir/bar.txt" cannot be found or not in a path
specified with -J
I tried the obvious buildPath("dir", "bar.txt") instead and now:
Error: file "dir\\bar.d" cannot be found or not in a path
specified with -J
I tried r"dir\bar.txt" and "dir\\bar.txt" and still nothing.
What am I supposed to do? Thanks,
Atila
There is already a bug report for this problem:
https://issues.dlang.org/show_bug.cgi?id=14349
Also the manual is not clear about the feature: should a -J path
be recursive or not ?
http://dlang.org/expression.html#ImportExpression
Jun 10 2015









"Yuxuan Shui" <yshuiv7 gmail.com> 