Undefined identifier WIN32_FILE_ATTRIBUTE_DATA
Regan Heath
regan at netmail.co.nz
Wed Nov 14 06:28:55 PST 2012
On Tue, 13 Nov 2012 22:52:42 -0000, Martin Drašar <drasar at ics.muni.cz>
wrote:
> Dne 13.11.2012 17:44, Regan Heath napsal(a):
>> Does your dmd2\src\druntime\import\core\sys\windows\windows.d file have
>> a definition of WIN32_FILE_ATTRIBUTE_DATA on line 448?
>
> Yup, it is there.
>
> struct WIN32_FILE_ATTRIBUTE_DATA
> {
> DWORD dwFileAttributes;
> FILETIME ftCreationTime;
> FILETIME ftLastAccessTime;
> FILETIME ftLastWriteTime;
> DWORD nFileSizeHigh;
> DWORD nFileSizeLow;
> }
> alias * LPWIN32_FILE_ATTRIBUTE_DATA;
>
> The most annoying thing is that when you look at the std.file source,
> you see that 'public import core.sys.windows.windows' and if you click
> on 'Go to definition' in Visual studio it takes you right to windows.d
> file with that WIN32_FILE_ATTRIBUTE_DATA struct defined...
Well.. druntime is built into a lib, and phobos is built using that lib.
So, the only way I can imagine reproducing this error is by altering
dmd2\src\druntime\import\core\sys\windows\windows.d, rebuilding druntime,
then rebuilding phobos and replacing the phobos.lib in dmd2\windows\lib.
BUT, doing so fails at the rebuild of phobos, giving the error:
std\file.d(530): Error: undefined identifier WIN32_FILE_ATTRIBUTE_DATA,
did you mean struct xxWIN32_FILE_ATTRIBUTE_DATA?
So.. it's almost like in your case the rdmd/dmd command line is not using
the pre-built phobos.lib, but trying to recompile std.file itself.
I assume you have a dmd2\windows\lib\phobos.lib? What are the dates on
various files.. is it possible you are time shifted in such a way which is
confusing the compiler into ignoring phobos.lib and rebuilding from source?
What happens if you run dumpobj (dmc\dm\bin) on phobos.lib, .e.g
dumpobj -p phobos.lib > output.txt
then open output.txt and look for WIN32_FILE_ATTRIBUTE_DATA. Bear in mind
the output wraps the symbol names as needed so simply searching for
"WIN32_FILE_ATTRIBUTE_DATA" wont find anything.
Searching for "WIN" and filtering manually I found:
81499 PUB386 1 4 3e 5f 44 34 63 6f 72 65 33 73 79 73 37 77
..>_D4core3sys7w
69 6e 64 6f 77 73 37 77 69 6e 64 6f 77 73 32 35
indows7windows25
57 49 4e 33 32 5f 46 49 4c 45 5f 41 54 54 52 49
WIN32_FILE_ATTRI
42 55 54 45 5f 44 41 54 41 36 5f 5f 69 6e 69 74
BUTE_DATA6__init
5a 0 0 0 0 0 Z.....
87599 LNAMES 4a 5f 44 36 32 54 79 70 65 49 6e 66 6f 5f 53 34
J_D62TypeInfo_S4
63 6f 72 65 33 73 79 73 37 77 69 6e 64 6f 77 73
core3sys7windows
37 77 69 6e 64 6f 77 73 32 35 57 49 4e 33 32 5f
7windows25WIN32_
46 49 4c 45 5f 41 54 54 52 49 42 55 54 45 5f 44
FILE_ATTRIBUTE_D
41 54 41 36 5f 5f 69 6e 69 74 5a ATA6__initZ
8776f CMD386 0 10 0 0 0 0 0 0 1 2 a 0 0 0 0 0
................
0 0 0 32 0 0 0 3c 0 0 0 24 0 0 0 0
...2...<...$....
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
................
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 4
................
0 0 0 0 0 0 0 63 6f 72 65 2e 73 79 73 2e
.......core.sys.
77 69 6e 64 6f 77 73 2e 77 69 6e 64 6f 77 73 2e
windows.windows.
57 49 4e 33 32 5f 46 49 4c 45 5f 41 54 54 52 49
WIN32_FILE_ATTRI
42 55 54 45 5f 44 41 54 41 0 BUTE_DATA.
1bba05 LNAMES 5b 5f 44 33 73 74 64 34 66 69 6c 65 32 30 67 65
[_D3std4file20ge
74 46 69 6c 65 41 74 74 72 69 62 75 74 65 73 57
tFileAttributesW
69 6e 46 78 41 61 5a 53 34 63 6f 72 65 33 73 79
inFxAaZS4core3sy
73 37 77 69 6e 64 6f 77 73 37 77 69 6e 64 6f 77
s7windows7window
73 32 35 57 49 4e 33 32 5f 46 49 4c 45 5f 41 54
s25WIN32_FILE_AT
54 52 49 42 55 54 45 5f 44 41 54 41 TRIBUTE_DATA
1bba6b LNAMES 7a 5f 44 33 73 74 64 34 66 69 6c 65 32 30 67 65
z_D3std4file20ge
74 46 80 83 89 41 74 74 72 69 62 75 74 65 73 57
tF...AttributesW
69 6e 46 78 41 61 5a 53 34 63 6f 72 65 33 73 79
inFxAaZS4core3sy
73 37 77 69 6e 64 6f 77 ff 73 32 35 57 49 4e 33
s7window.s25WIN3
32 5f 46 49 4c 45 5f 41 54 54 52 49 42 55 54 45
2_FILE_ATTRIBUTE
5f 44 41 54 41 31 35 5f 5f 64 67 6c 69 74 65 72
_DATA15__dgliter
61 6c 32 32 36 38 4d 46 5a 43 36 6f 62 6a 65 63
al2268MFZC6objec
74 39 54 68 72 6f 77 61 62 6c 65 t9Throwable
1bc1f1 EXTDEF 5b 5f 44 33 73 74 64 34 66 69 6c 65 32 30 67 65
[_D3std4file20ge
74 46 69 6c 65 41 74 74 72 69 62 75 74 65 73 57
tFileAttributesW
69 6e 46 78 41 61 5a 53 34 63 6f 72 65 33 73 79
inFxAaZS4core3sy
73 37 77 69 6e 64 6f 77 73 37 77 69 6e 64 6f 77
s7windows7window
73 32 35 57 49 4e 33 32 5f 46 49 4c 45 5f 41 54
s25WIN32_FILE_AT
54 52 49 42 55 54 45 5f 44 41 54 41 0
TRIBUTE_DATA.
1bc58c EXTDEF 5b 5f 44 33 73 74 64 34 66 69 6c 65 32 30 67 65
[_D3std4file20ge
74 46 69 6c 65 41 74 74 72 69 62 75 74 65 73 57
tFileAttributesW
69 6e 46 78 41 61 5a 53 34 63 6f 72 65 33 73 79
inFxAaZS4core3sy
73 37 77 69 6e 64 6f 77 73 37 77 69 6e 64 6f 77
s7windows7window
73 32 35 57 49 4e 33 32 5f 46 49 4c 45 5f 41 54
s25WIN32_FILE_AT
54 52 49 42 55 54 45 5f 44 41 54 41 0
TRIBUTE_DATA.
1bf00e EXTDEF 17 5f 44 31 31 54 79 70 65 49 6e 66 6f 5f 41 61
._D11TypeInfo_Aa
36 5f 5f 69 6e 69 74 5a 0 5b 5f 44 33 73 74 64
6__initZ.[_D3std
34 66 69 6c 65 32 30 67 65 74 46 69 6c 65 41 74
4file20getFileAt
74 72 69 62 75 74 65 73 57 69 6e 46 78 41 61 5a
tributesWinFxAaZ
53 34 63 6f 72 65 33 73 79 73 37 77 69 6e 64 6f
S4core3sys7windo
77 73 37 77 69 6e 64 6f 77 73 32 35 57 49 4e 33
ws7windows25WIN3
32 5f 46 49 4c 45 5f 41 54 54 52 49 42 55 54 45
2_FILE_ATTRIBUTE
5f 44 41 54 41 0 _DATA.
R
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
More information about the Digitalmars-d
mailing list