[vbox-dev] _interlockedbittestandset and PSDK Vista Feb 2007

S. Brandt sbrandt at gmx.de
Mon Jun 28 03:25:08 PDT 2010


Hi!
Some time ago (2010-02-15), Andreas told me to use the Vista Platform SDK (Feb 2007) to find credentialprovider.h needed for the guest additions.

I installed it today, and compiling virtualbox stopped working (3.2.6).
I'm using visual studio 2005sp1 as recommended by http://www.virtualbox.org/wiki/Windows%20build%20instructions.

C:\PROGRA~1\MICROS~4\VC\include\intrin.h(944) : error C2733: second C linkage of overloaded function '_interlockedbittestandset' not allowed
        C:\PROGRA~1\MICROS~4\VC\include\intrin.h(944) : see declaration of '_interlockedbittestandset'
C:\PROGRA~1\MICROS~4\VC\include\intrin.h(945) : error C2733: second C linkage of overloaded function '_interlockedbittestandreset' not allowed
        C:\PROGRA~1\MICROS~4\VC\include\intrin.h(945) : see declaration of '_interlockedbittestandreset'
kmk.exe[2]: *** [E:/VirtualBox-3.2.6_OSE/out/win.x86/release/obj/RuntimeR3/r3/alloc-ef.obj] Error 2

I found some information about this, that _interlockedbittestandset are defined in both VS05 intrin.h, and PSDK 2007-02 WinNT.h

According to MS, the bug is known and will be fixed ... but probably not for the old versions.
http://connect.microsoft.com/VisualStudio/feedback/details/262047/compiler-error-when-including-windows-h-and-intrin-h-in-the-same-compilation-unit
http://connect.microsoft.com/VisualStudio/feedback/details/472491/intrin-h-and-windows-h-through-winnt-h-conflict

The problem is, if I remove the definition from one of the two files, some compilation files always break, either those depending on WinNT.h defining it, or the ones depending on intrinsic.h defining it, or those that include both.

Is there any way? As far as I understood, VS05sp1+PSDKFeb2007 is the setup the vbox developers use themselves ...

I've got the impression that there are more problems with the Vista PSDK (e.g., 
C:\devel\PSDKVista60\Include\unknwn.idl(108) : error MIDL2025 : syntax error : expecting ] or , near "annotation"
C:\devel\PSDKVista60\Include\unknwn.idl(108) : error MIDL2026 : cannot recover from earlier syntax errors; aborting compilation
kmk.exe[2]: *** [E:/VirtualBox-3.2.6_OSE/out/win.x86/release/obj/VBoxCOM/VirtualBox_i.c] Error 2026
)
so I just go back to the 2003R2 PSDK and give the credentials support a miss.

Yours,
Sebastian Brandt






More information about the vbox-dev mailing list