2

Looking thru the definitions in winnt.h from rubenvb's 4.7.2 download (c++.exe --version is rubenvb-4.7.2-release) reveals a number of routines with inline assembly that simply don't work correctly. At least they don't on my i7 processor (could these have been coded for some other processor?).

However, given the nature of how gcc is developed, it seems possible that some other implementation has done a better job with this file.

So, 2 questions:

  1. Does anyone know where to find a better winnt.h?
  2. Failing that, does anyone know how to contact reubanvb?
David Wohlferd
  • 7,110
  • 2
  • 29
  • 56

2 Answers2

1

The Windows SDK is a free download. You can get the one for Windows 8 here, or use this one to stick with targeting Windows 7. Naturally, it includes all of the headers necessary to call Windows functions, including WinNT.h.

Cody Gray - on strike
  • 239,200
  • 50
  • 490
  • 574
  • I see no reason why it wouldn't be. It is the only way to develop Windows applications, so if MinGW supports developing Windows applications, it will have to support the Windows SDK. MinGW is just a C++ compiler. – Cody Gray - on strike Mar 22 '13 at 03:26
  • @cody I think you have missed the point. The original post made reference to "a number of routines with inline assembly." This is (part of) gcc's answer to intrinsics. The "#pragma intrinsic(_BitScanForward)" in the WSDK's winnt.h is completely ignored by gcc. The answer appears to be work with the developers at sourceforge to get these routines repaired, which is what I am doing. They are receptive, but it has been slow going. – David Wohlferd Mar 23 '13 at 04:29
  • Guess so. Seemed like a weird question. If there's a bug in code you're getting from a particular vendor, you should contact that vendor for support. I assumed you wanted to know "where to find a better winnt.h", and so I answered that question. – Cody Gray - on strike Mar 25 '13 at 07:00
1

I have worked with the Mingw-w64 team to update the asm routines in winnt.h (and other headers). To the best of my knowledge, they are all correct now.

David Wohlferd
  • 7,110
  • 2
  • 29
  • 56