Importing text file, path not found
Tolga Cakiroglu (tcak)
tcak at pcak.com
Tue Feb 18 00:45:14 PST 2014
I am testing with the import expression. I am using the "-J" flag
while compiling.
dmd app.d -J/home/user/include
void main(){
auto test = json.parseJSON(
import("/home/user/include/test.json") );
}
1. Because I am giving the full path of that file to be imported.
But compiler is complaining about that it cannot find the file.
If I remove the path, and leave the file name only, it works. Am
I doing something wrong, or bug?
2. Why do I need to tell compiler where to look at if I am going
to tell where the file is already? Shouldn't it be like "Hey
compiler, if you cannot while the file, look at those places",
and I shouldn't need to use J flag if not necessary?
More information about the Digitalmars-d-learn
mailing list