digitalmars.D.learn - setAttributes call error
- Jay Norwood (30/30) Mar 17 2014 I updated to 2.065, and using visualD for the build on Windows.
- Jay Norwood (2/2) Mar 17 2014 Sorry, this is my fault. I had an old installation of 2.064
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); }
Mar 17 2014
Sorry, this is my fault. I had an old installation of 2.064 still in the path.
Mar 17 2014