当试图通过windows.h编译包含winnt.h的文件时,我收到以下错误:
MyGl.cpp ..\microsoft sdks\windows\v6.0a\include\winnt.h(964) : error C2988: unrecognizable template declaration/definition ..\microsoft sdks\windows\v6.0a\include\winnt.h(964) : error C2059: syntax error : '&'
他们指向Winnt.h中的以下行
extern "C++" // templates cannot be declared to have 'C' linkage
template <typename T, size_t N>
char (*RtlpNumberOf( UNALIGNED T (&)[N] ))[N];
#define RTL_NUMBER_OF_V2(A) (sizeof(*RtlpNumberOf(A)))
Run Code Online (Sandbox Code Playgroud)
对于发生了什么的任何想法?
我的编译器:
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08 for 80x86 Copyright (C) Microsoft Corporation. All rights reserved.