Re: Undefined identifier WIN32_FILE_ATTRIBUTE_DATA

2012-11-15 Thread Rainer Schuetze



On 11/15/2012 8:17 AM, Martin Drašar wrote:

Dne 15.11.2012 7:45, Rainer Schuetze napsal(a):

[...]

 
  importcore.sys.windows.windows(C:\Program
Files\D\dmd2\windows\bin\..\..\src\druntime\import\core\sys\windows\windows.di)



since dmd 2.060 most of the files in druntme/import are plain copies of
the source .d files, not generated .di files. My guess is that you have
copied dmd 2.060 over an older version which included the .di files and
you are now left with a mixture of versions.

I suggest you should reinstall dmd 2.060 into an empty directory.


Hi, Rainer,

you nailed it, thanks! I've managed to overwrite two older installations
on both machines I was playing with. Clean installation did the trick.


In previous versions installing over an older version usually did not 
cause any troubles as long as you didn't use files that were not 
overwritten. dmd 2.060 is special in this regard.




There should probably be a check for previously installed versions in
the installer, so it will at least yell at you that there are problems
waiting. Is there some place where I could fill an enhancement request?


Bug reports and enhancement requests go here: http://d.puremagic.com/issues/

Rainer


Re: Undefined identifier WIN32_FILE_ATTRIBUTE_DATA

2012-11-14 Thread Regan Heath
On Tue, 13 Nov 2012 22:52:42 -, Martin Drašar dra...@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
{
 DWORDdwFileAttributes;
 FILETIME ftCreationTime;
 FILETIME ftLastAccessTime;
 FILETIME ftLastWriteTime;
 DWORDnFileSizeHigh;
 DWORDnFileSizeLow;
}
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 

Re: Undefined identifier WIN32_FILE_ATTRIBUTE_DATA

2012-11-14 Thread Martin Drasar
On 14.11.2012 15:28, Regan Heath wrote:
 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?

Yes, I have it. Times are normal. All files are from yesterday when I
installed the dmd.

 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.

 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. 

^ These three I have the same.

 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 

^ These two - the same content, but the address (or offset or what it
is) is different. 1b8685 and 1b86eb respectively.

 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  0TRIBUTE_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
 

Re: Undefined identifier WIN32_FILE_ATTRIBUTE_DATA

2012-11-14 Thread Regan Heath
On Wed, 14 Nov 2012 15:37:19 -, Martin Drasar dra...@ics.muni.cz  
wrote:



On 14.11.2012 15:28, Regan Heath wrote:

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?


Yes, I have it. Times are normal. All files are from yesterday when I
installed the dmd.


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.


...snip...

I had to do the dump on linux, because I could not found the dumpobj
binary where you said it should be.

I hope this gives a hint where the problem might be.


I hope so to .. but I don't have a clue.  I'm not at all familiar with the  
output of dumpobj so I can't really debug this any further.  TBH I was  
banking on you not finding the symbols or them being radically different  
or something strange.


Have you tried dmd in verbose mode, perhaps that'll give a clue.

R

--
Using Opera's revolutionary email client: http://www.opera.com/mail/


Re: Undefined identifier WIN32_FILE_ATTRIBUTE_DATA

2012-11-14 Thread Martin Drašar

Dne 14.11.2012 18:18, Regan Heath napsal(a):

I hope this gives a hint where the problem might be.


I hope so to .. but I don't have a clue.  I'm not at all familiar with
the output of dumpobj so I can't really debug this any further.  TBH I
was banking on you not finding the symbols or them being radically
different or something strange.


Yeah, I was kind of expecting it as well...

Low level gurus out there - HELP US! :-)


Have you tried dmd in verbose mode, perhaps that'll give a clue.


Verbose output is attached, but I am afraid that it does not give much 
answers. The error is on the top, don't know why - if it is not 
redirected to a file, it is the last thing displayed.


Anyway, thanks for your assistance.

Martin

C:\Program Files\D\dmd2\windows\bin\..\..\src\phobos\std\file.d(530): Error: 
undefined identifier WIN32_FILE_ATTRIBUTE_DATA
binaryC:\Program Files\D\dmd2\windows\bin\dmd.exe
version   v2.060
configC:\Program Files\D\dmd2\windows\bin\sc.ini
parse main
importall main
importobject(C:\Program 
Files\D\dmd2\windows\bin\..\..\src\druntime\import\object.di)
importstd.file  (C:\Program 
Files\D\dmd2\windows\bin\..\..\src\phobos\std\file.d)
importcore.memory   (C:\Program 
Files\D\dmd2\windows\bin\..\..\src\druntime\import\core\memory.di)
importcore.stdc.stdio   (C:\Program 
Files\D\dmd2\windows\bin\..\..\src\druntime\import\core\stdc\stdio.di)
importcore.stdc.config  (C:\Program 
Files\D\dmd2\windows\bin\..\..\src\druntime\import\core\stdc\config.di)
importcore.stdc.stddef  (C:\Program 
Files\D\dmd2\windows\bin\..\..\src\druntime\import\core\stdc\stddef.di)
importcore.stdc.stdarg  (C:\Program 
Files\D\dmd2\windows\bin\..\..\src\druntime\import\core\stdc\stdarg.di)
importcore.stdc.stdlib  (C:\Program 
Files\D\dmd2\windows\bin\..\..\src\druntime\import\core\stdc\stdlib.di)
importcore.stdc.string  (C:\Program 
Files\D\dmd2\windows\bin\..\..\src\druntime\import\core\stdc\string.di)
importcore.stdc.errno   (C:\Program 
Files\D\dmd2\windows\bin\..\..\src\druntime\import\core\stdc\errno.di)
importstd.algorithm (C:\Program 
Files\D\dmd2\windows\bin\..\..\src\phobos\std\algorithm.d)
importstd.c.string  (C:\Program 
Files\D\dmd2\windows\bin\..\..\src\phobos\std\c\string.d)
importstd.array (C:\Program 
Files\D\dmd2\windows\bin\..\..\src\phobos\std\array.d)
importcore.bitop(C:\Program 
Files\D\dmd2\windows\bin\..\..\src\druntime\import\core\bitop.di)
importstd.ascii (C:\Program 
Files\D\dmd2\windows\bin\..\..\src\phobos\std\ascii.d)
importstd.conv  (C:\Program 
Files\D\dmd2\windows\bin\..\..\src\phobos\std\conv.d)
importcore.stdc.math(C:\Program 
Files\D\dmd2\windows\bin\..\..\src\druntime\import\core\stdc\math.di)
importstd.exception (C:\Program 
Files\D\dmd2\windows\bin\..\..\src\phobos\std\exception.d)
importstd.range (C:\Program 
Files\D\dmd2\windows\bin\..\..\src\phobos\std\range.d)
importstd.functional(C:\Program 
Files\D\dmd2\windows\bin\..\..\src\phobos\std\functional.d)
importstd.metastrings   (C:\Program 
Files\D\dmd2\windows\bin\..\..\src\phobos\std\metastrings.d)
importstd.traits(C:\Program 
Files\D\dmd2\windows\bin\..\..\src\phobos\std\traits.d)
importstd.typetuple (C:\Program 
Files\D\dmd2\windows\bin\..\..\src\phobos\std\typetuple.d)
importstd.typecons  (C:\Program 
Files\D\dmd2\windows\bin\..\..\src\phobos\std\typecons.d)
importstd.format(C:\Program 
Files\D\dmd2\windows\bin\..\..\src\phobos\std\format.d)
importcore.vararg   (C:\Program 
Files\D\dmd2\windows\bin\..\..\src\druntime\import\core\vararg.di)
importstd.bitmanip  (C:\Program 
Files\D\dmd2\windows\bin\..\..\src\phobos\std\bitmanip.d)
importstd.system(C:\Program 
Files\D\dmd2\windows\bin\..\..\src\phobos\std\system.d)
importstd.math  (C:\Program 
Files\D\dmd2\windows\bin\..\..\src\phobos\std\math.d)
importstd.string(C:\Program 
Files\D\dmd2\windows\bin\..\..\src\phobos\std\string.d)
importcore.exception(C:\Program 
Files\D\dmd2\windows\bin\..\..\src\druntime\import\core\exception.di)
importstd.regex (C:\Program 
Files\D\dmd2\windows\bin\..\..\src\phobos\std\regex.d)
importstd.internal.uni  (C:\Program 
Files\D\dmd2\windows\bin\..\..\src\phobos\std\internal\uni.d)
importstd.uni   (C:\Program 
Files\D\dmd2\windows\bin\..\..\src\phobos\std\uni.d)
importstd.internal.uni_tab  (C:\Program 
Files\D\dmd2\windows\bin\..\..\src\phobos\std\internal\uni_tab.d)
importstd.utf   (C:\Program 
Files\D\dmd2\windows\bin\..\..\src\phobos\std\utf.d)
importstd.container (C:\Program 
Files\D\dmd2\windows\bin\..\..\src\phobos\std\container.d)
importstd.datetime  (C:\Program 
Files\D\dmd2\windows\bin\..\..\src\phobos\std\datetime.d)
importcore.time (C:\Program 
Files\D\dmd2\windows\bin\..\..\src\druntime\import\core\time.di)
importcore.stdc.time

Re: Undefined identifier WIN32_FILE_ATTRIBUTE_DATA

2012-11-14 Thread Rainer Schuetze



On 11/14/2012 9:49 PM, Martin Drašar wrote:

Dne 14.11.2012 18:18, Regan Heath napsal(a):

I hope this gives a hint where the problem might be.


I hope so to .. but I don't have a clue.  I'm not at all familiar with
the output of dumpobj so I can't really debug this any further.  TBH I
was banking on you not finding the symbols or them being radically
different or something strange.


Yeah, I was kind of expecting it as well...

Low level gurus out there - HELP US! :-)


Have you tried dmd in verbose mode, perhaps that'll give a clue.


Verbose output is attached, but I am afraid that it does not give much
answers. The error is on the top, don't know why - if it is not
redirected to a file, it is the last thing displayed.

Anyway, thanks for your assistance.

Martin


[...]


 importcore.sys.windows.windows	(C:\Program 
Files\D\dmd2\windows\bin\..\..\src\druntime\import\core\sys\windows\windows.di)


since dmd 2.060 most of the files in druntme/import are plain copies of 
the source .d files, not generated .di files. My guess is that you have 
copied dmd 2.060 over an older version which included the .di files and 
you are now left with a mixture of versions.


I suggest you should reinstall dmd 2.060 into an empty directory.


Re: Undefined identifier WIN32_FILE_ATTRIBUTE_DATA

2012-11-14 Thread Martin Drašar

Dne 15.11.2012 7:45, Rainer Schuetze napsal(a):

[...]

 
  importcore.sys.windows.windows(C:\Program
Files\D\dmd2\windows\bin\..\..\src\druntime\import\core\sys\windows\windows.di)


since dmd 2.060 most of the files in druntme/import are plain copies of
the source .d files, not generated .di files. My guess is that you have
copied dmd 2.060 over an older version which included the .di files and
you are now left with a mixture of versions.

I suggest you should reinstall dmd 2.060 into an empty directory.


Hi, Rainer,

you nailed it, thanks! I've managed to overwrite two older installations 
on both machines I was playing with. Clean installation did the trick.


There should probably be a check for previously installed versions in 
the installer, so it will at least yell at you that there are problems 
waiting. Is there some place where I could fill an enhancement request?


Martin


Re: Undefined identifier WIN32_FILE_ATTRIBUTE_DATA

2012-11-13 Thread Regan Heath
On Mon, 12 Nov 2012 21:22:16 -, Martin Drašar dra...@ics.muni.cz  
wrote:



Dne 11.11.2012 21:41, Regan Heath napsal(a):
On Sun, 11 Nov 2012 08:03:40 -, creatio creatio.x...@gmail.com  
wrote:




I'm not sure if this is the correct forum. But It looks like I'm one
of the few people that ran into this. I've recently upgraded to 2.60
and been getting this error when compiling:

Error: undefined identifier WIN32_FILE_ATTRIBUTE_DATA
D:\__dev\D\dmd2\src\phobos\std\file.d530

Now I have found the thread of Walter at
http://www.digitalmars.com/d/archives/digitalmars/D/announce/D_version_of_MicroEmacs_24416.html
, but it didn't help me much to solving my problem. Does anyone have
an idea how I can fix this :-S


Try to reduce your code down to a sample which fails and post it here.

R


Hi Regan,

rdmd --eval=import std.file; --main

Environment: DMD32 D Compiler v2.060, Windows 7 Pro 32bit


I get no errors, in fact I get no output at all from that command line.

Environment: DMD32 D Compiler v2.060, Windows 7 Pro 64bit

R

--
Using Opera's revolutionary email client: http://www.opera.com/mail/


Re: Undefined identifier WIN32_FILE_ATTRIBUTE_DATA

2012-11-13 Thread Martin Drasar
On 13.11.2012 12:41, Regan Heath wrote:
 Hi Regan,

 rdmd --eval=import std.file; --main

 Environment: DMD32 D Compiler v2.060, Windows 7 Pro 32bit
 
 I get no errors, in fact I get no output at all from that command line.
 
 Environment: DMD32 D Compiler v2.060, Windows 7 Pro 64bit
 
 R

Hmm,

that is might strange. I have just downloaded D installer from the
website, installed it on Windows 7 Pro 64bit and ran the command and
this is what I got:

 std.cpuid has been deprecated. It will be removed in January 2013. Please use 
 co
 re.cpuid instead.
 C:\Program Files\D\dmd2\windows\bin\..\..\src\phobos\std\file.d(530): Error: 
 und
 efined identifier WIN32_FILE_ATTRIBUTE_DATA

Which is exactly the same error I have on 32bit machine.

Martin


Re: Undefined identifier WIN32_FILE_ATTRIBUTE_DATA

2012-11-13 Thread Regan Heath
On Tue, 13 Nov 2012 12:21:06 -, Martin Drasar dra...@ics.muni.cz  
wrote:



On 13.11.2012 12:41, Regan Heath wrote:

Hi Regan,

rdmd --eval=import std.file; --main

Environment: DMD32 D Compiler v2.060, Windows 7 Pro 32bit


I get no errors, in fact I get no output at all from that command line.

Environment: DMD32 D Compiler v2.060, Windows 7 Pro 64bit

R


Hmm,

that is might strange. I have just downloaded D installer from the
website, installed it on Windows 7 Pro 64bit and ran the command and
this is what I got:

std.cpuid has been deprecated. It will be removed in January 2013.  
Please use co

re.cpuid instead.
C:\Program Files\D\dmd2\windows\bin\..\..\src\phobos\std\file.d(530):  
Error: und

efined identifier WIN32_FILE_ATTRIBUTE_DATA


Which is exactly the same error I have on 32bit machine.


Curiouser and curiouser.  In my case I had (re)built phobos/druntime so,  
suspecting it might be causing issues I download a fresh copy of the  
installer, moved my old installation folder and replaced it with the new  
one.


I still don't get any output/errors.

If I add --force to the command line given, I get the std.cpuid  
deprecation warning, but no other output.


I stripped my PATH right back to just about nothing and that made no  
difference.


Can you get the same errors running dmd directly?  I can't seem to get it  
to output the deprecation message..


R

--
Using Opera's revolutionary email client: http://www.opera.com/mail/


Re: Undefined identifier WIN32_FILE_ATTRIBUTE_DATA

2012-11-13 Thread Martin Drasar
On 13.11.2012 15:00, Regan Heath wrote:

 Curiouser and curiouser.  In my case I had (re)built phobos/druntime so,
 suspecting it might be causing issues I download a fresh copy of the
 installer, moved my old installation folder and replaced it with the new
 one.
 
 I still don't get any output/errors.
 
 If I add --force to the command line given, I get the std.cpuid
 deprecation warning, but no other output.
 
 I stripped my PATH right back to just about nothing and that made no
 difference.
 
 Can you get the same errors running dmd directly?  I can't seem to get
 it to output the deprecation message..
 
 R
 

Odd...

When running the dmd directly I only get the WIN32_FILE_ATTRIBUTE_DATA
error, not the deprecation message. I have posted the rdmd command,
because it was a bit shorter and easier to test than the dmd.

This is my sc.ini if it helps anything:
[Version]
version=7.51 Build 020

[Environment]
LIB=%@P%\..\lib;\dm\lib
DFLAGS=-I%@P%\..\..\src\phobos -I%@P%\..\..\src\druntime\import
LINKCMD=%@P%\link.exe

Martin


Re: Undefined identifier WIN32_FILE_ATTRIBUTE_DATA

2012-11-13 Thread Regan Heath
On Tue, 13 Nov 2012 15:37:54 -, Martin Drasar dra...@ics.muni.cz  
wrote:



On 13.11.2012 15:00, Regan Heath wrote:


Curiouser and curiouser.  In my case I had (re)built phobos/druntime so,
suspecting it might be causing issues I download a fresh copy of the
installer, moved my old installation folder and replaced it with the new
one.

I still don't get any output/errors.

If I add --force to the command line given, I get the std.cpuid
deprecation warning, but no other output.

I stripped my PATH right back to just about nothing and that made no
difference.

Can you get the same errors running dmd directly?  I can't seem to get
it to output the deprecation message..

R



Odd...

When running the dmd directly I only get the WIN32_FILE_ATTRIBUTE_DATA
error, not the deprecation message. I have posted the rdmd command,
because it was a bit shorter and easier to test than the dmd.

This is my sc.ini if it helps anything:
[Version]
version=7.51 Build 020

[Environment]
LIB=%@P%\..\lib;\dm\lib
DFLAGS=-I%@P%\..\..\src\phobos -I%@P%\..\..\src\druntime\import
LINKCMD=%@P%\link.exe


Mine is the same (default, no modifications).  I have added the dmd.exe  
path to PATH and I rely on the relative path references in the default  
sc.ini to find everything else.


Looking at the rdmd source I realised it was creating files in  
%TEMP%\.rdmd and in there I found the source it was compiling:


module temporary;
import std.stdio, std.algorithm, std.array, std.ascii, std.base64,
std.bigint, std.bitmanip,
std.compiler, std.complex, std.concurrency, std.container, std.conv,
std.cpuid, std.cstream, std.csv,
std.datetime, std.demangle, std.encoding, std.exception,
std.file,
std.format, std.functional, std.getopt, std.json,
std.math, std.mathspecial, std.md5, std.metastrings, std.mmfile,
std.numeric, std.outbuffer, std.parallelism, std.path, std.process,
std.random, std.range, std.regex, std.signals, std.socket,
std.socketstream, std.stdint, std.stdio, std.stdiobase, std.stream,
std.string, std.syserror, std.system, std.traits, std.typecons,
std.typetuple, std.uni, std.uri, std.utf, std.variant, std.xml,  
std.zip,

std.zlib;
void main(char[][] args) {
import std.file;;
}

I suspect the reason you only see the deprecation message with rdmd is the  
import of std.cpuid in the above.  So, I believe that is one mystery  
solved but the main problem still isn't a problem on my machine for some  
reason.


Does your dmd2\src\druntime\import\core\sys\windows\windows.d file have a  
definition of WIN32_FILE_ATTRIBUTE_DATA on line 448?


R

--
Using Opera's revolutionary email client: http://www.opera.com/mail/


Re: Undefined identifier WIN32_FILE_ATTRIBUTE_DATA

2012-11-13 Thread Martin Drašar

Dne 13.11.2012 17:44, Regan Heath napsal(a):

I suspect the reason you only see the deprecation message with rdmd is
the import of std.cpuid in the above.  So, I believe that is one
mystery solved but the main problem still isn't a problem on my machine
for some reason.


Good... one down, one left.


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
{
DWORDdwFileAttributes;
FILETIME ftCreationTime;
FILETIME ftLastAccessTime;
FILETIME ftLastWriteTime;
DWORDnFileSizeHigh;
DWORDnFileSizeLow;
}
alias WIN32_FILE_ATTRIBUTE_DATA* 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...


Martin



Re: Undefined identifier WIN32_FILE_ATTRIBUTE_DATA

2012-11-12 Thread Martin Drašar

Dne 11.11.2012 21:41, Regan Heath napsal(a):

On Sun, 11 Nov 2012 08:03:40 -, creatio creatio.x...@gmail.com wrote:



I'm not sure if this is the correct forum. But It looks like I'm one
of the few people that ran into this. I've recently upgraded to 2.60
and been getting this error when compiling:

Error: undefined identifier WIN32_FILE_ATTRIBUTE_DATA
D:\__dev\D\dmd2\src\phobos\std\file.d530

Now I have found the thread of Walter at
http://www.digitalmars.com/d/archives/digitalmars/D/announce/D_version_of_MicroEmacs_24416.html
, but it didn't help me much to solving my problem. Does anyone have
an idea how I can fix this :-S


Try to reduce your code down to a sample which fails and post it here.

R


Hi Regan,

rdmd --eval=import std.file; --main

Environment: DMD32 D Compiler v2.060, Windows 7 Pro 32bit

Martin


Re: Undefined identifier WIN32_FILE_ATTRIBUTE_DATA

2012-11-11 Thread Regan Heath

On Sun, 11 Nov 2012 08:03:40 -, creatio creatio.x...@gmail.com wrote:



I'm not sure if this is the correct forum. But It looks like I'm one of  
the few people that ran into this. I've recently upgraded to 2.60 and  
been getting this error when compiling:


Error: undefined identifier  
WIN32_FILE_ATTRIBUTE_DATA	D:\__dev\D\dmd2\src\phobos\std\file.d	530	


Now I have found the thread of Walter at  
http://www.digitalmars.com/d/archives/digitalmars/D/announce/D_version_of_MicroEmacs_24416.html  
, but it didn't help me much to solving my problem. Does anyone have an  
idea how I can fix this :-S


Try to reduce your code down to a sample which fails and post it here.

R

--
Using Opera's revolutionary email client: http://www.opera.com/mail/