I’m attempting to upgrade my project from a custom 4.16.3 build to 4.17. I’ve managed to jump through the most obvious hoops but I’m now getting errors inside the gen.cpp files for every class that contains an AddDynamic binding.
C:\Users\quinc\Documents\Unreal Projects\ProxyWarVR 4.15\Intermediate\Build\Win64\UE4Editor\Inc\ProxyWarVR\FlyDudesBotSpawnTriggerBox.gen.cpp(33): error C2059: syntax error: ')'
C:\Users\quinc\Documents\Unreal Projects\ProxyWarVR 4.15\Intermediate\Build\Win64\UE4Editor
Looking at the code, this appears to always happen in the same place:
void AProxyWarVRPluginCharacter::StaticRegisterNativesAProxyWarVRPluginCharacter()
{
UClass* Class = AProxyWarVRPluginCharacter::StaticClass();
static const TNameNativePtrPair<ANSICHAR> AnsiFuncs[] = {
{ "ExtendedSimpleMoveToLocation", (Native)&AProxyWarVRPluginCharacter::execExtendedSimpleMoveToLocation },
{ "GetTeleportLocation", (Native)&AProxyWarVRPluginCharacter::execGetTeleportLocation },
{ "NotifyOfTeleport", (Native)&AProxyWarVRPluginCharacter::execNotifyOfTeleport },
};
FNativeFunctionRegistrar::RegisterFunctions(Class, AnsiFuncs, ARRAY_COUNT(AnsiFuncs));
}
On the RegisterFunctions call. I’m getting a few suspicious warnings from the steamworks api as well:
c:\program files\epic games\ue_4.17\engine\source\thirdparty\steamworks\steamv139\sdk\public\steam\steamtypes.h(99): warning C4005: 'ARRAY_COUNT': macro redefinition
c:\program files\epic games\ue_4.17\engine\source\runtime\core\public\Templates/UnrealTemplate.h(135): note: see previous definition of 'ARRAY_COUNT'
c:\program files\epic games\ue_4.17\engine\source\thirdparty\steamworks\steamv139\sdk\public\steam\matchmakingtypes.h(45): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\string.h(346): note: see declaration of 'strncpy'
c:\program files\epic games\ue_4.17\engine\source\thirdparty\steamworks\steamv139\sdk\public\steam\matchmakingtypes.h(47): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\string.h(346): note: see declaration of 'strncpy'
c:\program files\epic games\ue_4.17\engine\source\thirdparty\steamworks\steamv139\sdk\public\steam\matchmakingtypes.h(161): warning C4996: '_snprintf': This function or variable may be unsafe. Consider using _snprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\stdio.h(1952): note: see declaration of '_snprintf'
c:\program files\epic games\ue_4.17\engine\source\thirdparty\steamworks\steamv139\sdk\public\steam\matchmakingtypes.h(246): warning C4996: 'strncpy': This function or variable may be unsafe. Consider using strncpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.
C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\string.h(346): note: see declaration of 'strncpy'
C:\Program Files\Epic Games\UE_4.17\Engine\Source\ThirdParty\Steamworks\Steamv139\sdk\public\steam/steam_api.h(273): warning C4265: 'CCallbackImpl<24>': class has virtual functions, but destructor is not virtual
instances of this class may not be destructed correctly
I suspect the ARRAY_COUNT macro redefinition is the culprit here, somehow. That warning was popping up in 4.16 too, as well as the strncpy warning, but something has clearly changed because the CCallbackImpl warning is new.