Compiler error when using Windows SDK #5691
-
This is the best guess of where to report this issue, as it seems to affect the Windows SDK. Context: I've downloaded and am trying to compile https://github.com/foone/3DMMForever in Visual Studio 2022. Problem: I'm getting these compiler errors:
appbwin.cpp neither includes winnt.h nor xmmintrin.h directly. In fact, none of the source includes either of these headers directly. They seem to be linked indirectly through other header calls, which suggests to me that this conflict is arising somewhere in the SDK itself. Yet it's strange that I'm the only one with this problem, so maybe I just have my configuration set up incorrectly? As you can probably guess, I'm on a x64 Win 10 system compiling to x86. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
The definitions are close enough that they should effectively be the same. The intrinsic definition in winnt.h is:
The intrinsic definition in xmmintrin.h is:
The SAL In just gets ignored by the compiler. What's more, a simple:
compiles with no issue. So I would seriously suggest looking at CONST. This is defined in minwindef.h as
This makes it the only definition in the Windows headers that can be overridden and changed. |
Beta Was this translation helpful? Give feedback.
The definitions are close enough that they should effectively be the same.
The intrinsic definition in winnt.h is:
VOID _mm_prefetch(_In_ CHAR CONST *a, _In_ int sel);
The intrinsic definition in xmmintrin.h is:
extern void _mm_prefetch(char const *_A, int _Sel);
The SAL In just gets ignored by the compiler. What's more, a simple:
compiles with no issue.
So I would seriously suggest looking at CONST. This is defined in minwindef.h as
This makes it the only definition in the Windows headers that can be overridden and changed.