DK22Pac / plugin-sdk

An SDK for developing ASI/CLEO plugins for GTA San Andreas, GTA Vice City and GTA III
zlib License
435 stars 118 forks source link

Visual Studio Syntax Error When Building Solution #142

Open DJHotLettuce opened 2 years ago

DJHotLettuce commented 2 years ago

I'm getting this error 766 times on Visual Studio 2019 when building the generated .sln file: Error C2760 syntax error: unexpected token 'identifier', expected 'type specifier' plugin_sa C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\include\objbase.h 239

The line in question: static_cast<IUnknown*>(*pp); // make sure everyone derives from IUnknown

Full section extern "C++" { template<typename T> void** IID_PPV_ARGS_Helper(T** pp) { static_cast<IUnknown*>(*pp); // make sure everyone derives from IUnknown return reinterpret_cast<void**>(pp); } }

Is there a setting I'm missing here? Thanks

DJHotLettuce commented 2 years ago

I was able to fix this by not using Windows XP support. Apparently this is a bug in the SDK https://developercommunity.visualstudio.com/t/error-c2760-syntax-error-unexpected-token-identifi/1250023

asyth commented 2 years ago

i'm having the same issue but if i don t use the windows xp support i get : The build tools for x141_xp cannot be found

shpeenut22 commented 11 months ago

i have this problem too, but it happens in assembly.hpp, in 155 line. Compiler complains on "<" symbol in the line https://github.com/DK22Pac/plugin-sdk/blob/6033510ed3c9f299f24628a38e886e0d87726f74/injector/assembly.hpp#L155

shpeenut22 commented 11 months ago

i have this problem too, but it happens in assembly.hpp, in 155 line. Compiler complains on "<" symbol in the line

https://github.com/DK22Pac/plugin-sdk/blob/6033510ed3c9f299f24628a38e886e0d87726f74/injector/assembly.hpp#L155

i created issue too https://github.com/DK22Pac/plugin-sdk/issues/169