包括 <d3dkmthk.h> 会导致错误 'E0090 function returning function is not allowed'
Including <d3dkmthk.h> causes errors 'E0090 function returning function is not allowed'
在 Visual Studio 上的 x64 dll 项目中,添加此行:
#include <d3dkmthk.h>
给我这样的错误 :
Error (active) E0090 function returning function is not allowed
Error C2059 syntax error: '__cdecl'
Error C2143 syntax error: missing ';' before '__cdecl'
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int
问题是由#define WIN32_LEAN_AND_MEAN
引起的,删除这一行解决了问题。
在 Visual Studio 上的 x64 dll 项目中,添加此行:
#include <d3dkmthk.h>
给我这样的错误 :
Error (active) E0090 function returning function is not allowed
Error C2059 syntax error: '__cdecl'
Error C2143 syntax error: missing ';' before '__cdecl'
Error C4430 missing type specifier - int assumed. Note: C++ does not support default-int
问题是由#define WIN32_LEAN_AND_MEAN
引起的,删除这一行解决了问题。