March 17, 2014 setAttributes call error | ||||
---|---|---|---|---|
| ||||
I updated to 2.065, and using visualD for the build on Windows. VisualD finds this setAttributes call in file.d, but the build fails to find it in the library. Does this build for someone else? import std.file; void clrReadOnly( in char[] name) { uint oldAtt = getAttributes(name); version (Windows){ import core.sys.windows.windows; oldAtt ^= FILE_ATTRIBUTE_READONLY; } setAttributes(name, oldAtt); } int main(string[] argv) { clrReadOnly("c:\tf.txt"); return 0; } -------- Error 1 Error: undefined identifier setAttributes, did you mean function getAttributes? D:\setatt\setatt\setatt\main.d 10 void setAttributes(in char[] name, uint attributes) { version (Windows) { cenforce(SetFileAttributesW(std.utf.toUTF16z(name), attributes), name); } |
March 17, 2014 Re: setAttributes call error | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jay Norwood | Sorry, this is my fault. I had an old installation of 2.064 still in the path. |
Copyright © 1999-2021 by the D Language Foundation