Download

Cannot build steam_api.h [UE 4.18]

Hi, I am trying to follow this guide here to expose some blueprint functions for the Steam Overlay. A new, community-hosted Unreal Engine Wiki - Announcements and Releases - Unreal Engine Forums

I come across this issue here concerning the steam_api.h file when building.

I have attempted this last night but decided to try to start over again, when I get up to where they make the SteamManager.h file in the guide, I get all sorts of issues with the steam_api.h stuff.



1>------ Build started: Project: Mage, Configuration: Development_Editor x64 ------
1>  Creating makefile for hot reloading MageEditor (modules to compile have changed)
1>  Compiling game modules for hot reload
1>  Performing 4 actions (6 in parallel)
1>  MTGameInstance.gen.cpp
1>  SteamManager.gen.cpp
1>g:\epic games\ue_4.18\engine\source	hirdparty\steamworks\steamv139\sdk\public\steam\steamtypes.h(99): warning C4005: 'ARRAY_COUNT': macro redefinition
1>  G:\Epic Games\UE_4.18\Engine\Source\Runtime\Core\Public\Templates/UnrealTemplate.h(135): note: see previous definition of 'ARRAY_COUNT'
1>g:\epic games\ue_4.18\engine\source	hirdparty\steamworks\steamv139\sdk\public\steam\steamtypes.h(99): warning C4005: 'ARRAY_COUNT': macro redefinition
1>  G:\Epic Games\UE_4.18\Engine\Source\Runtime\Core\Public\Templates/UnrealTemplate.h(135): note: see previous definition of 'ARRAY_COUNT'
1>g:\epic games\ue_4.18\engine\source	hirdparty\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.g:\epic games\ue_4.18\engine\source	hirdparty\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.
1>
1>  C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\string.h(346): note: see declaration of 'strncpy'C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\string.h(346): note: see declaration of 'strncpy'
1>
1>g:\epic games\ue_4.18\engine\source	hirdparty\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.g:\epic games\ue_4.18\engine\source	hirdparty\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.
1>
1>  C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\string.h(346): note: see declaration of 'strncpy'C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\string.h(346): note: see declaration of 'strncpy'
1>
1>g:\epic games\ue_4.18\engine\source	hirdparty\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.
1>  C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\stdio.h(1952): note: see declaration of '_snprintf'
1>g:\epic games\ue_4.18\engine\source	hirdparty\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.
1>  C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\stdio.h(1952): note: see declaration of '_snprintf'
1>g:\epic games\ue_4.18\engine\source	hirdparty\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.
1>g:\epic games\ue_4.18\engine\source	hirdparty\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.
1>  C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\string.h(346): note: see declaration of 'strncpy'
1>  C:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt\string.h(346): note: see declaration of 'strncpy'
1>G:\Epic Games\UE_4.18\Engine\Source\ThirdParty/Steamworks/Steamv139/sdk/public/steam/steam_api.h(273): warning C4265: 'CCallbackImpl<1>': class has virtual functions, but destructor is not virtual
1>           instances of this class may not be destructed correctlyG:\Epic Games\UE_4.18\Engine\Source\ThirdParty/Steamworks/Steamv139/sdk/public/steam/steam_api.h(273): warning C4265: 'CCallbackImpl<1>': class has virtual functions, but destructor is not virtual
1>           instances of this class may not be destructed correctly
1>
1>  G:\Epic Games\UE_4.18\Engine\Source\ThirdParty/Steamworks/Steamv139/sdk/public/steam/steam_api.h(313): note: see reference to class template instantiation 'CCallbackImpl<1>' being compiledG:\Epic Games\UE_4.18\Engine\Source\ThirdParty/Steamworks/Steamv139/sdk/public/steam/steam_api.h(313): note: see reference to class template instantiation 'CCallbackImpl<1>' being compiled
1>
1>  G:\Epic Games\UE_4.18\Engine\Source\ThirdParty/Steamworks/Steamv139/sdk/public/steam/steam_api.h(338): note: see reference to class template instantiation 'CCallback<T,P,false>' being compiled
1>          with
1>          
1>              T=USteamManager,
1>              P=GameOverlayActivated_t
1>          ]G:\Epic Games\UE_4.18\Engine\Source\ThirdParty/Steamworks/Steamv139/sdk/public/steam/steam_api.h(338): note: see reference to class template instantiation 'CCallback<T,P,false>' being compiled
1>          with
1>          
1>              T=USteamManager,
1>              P=GameOverlayActivated_t
1>          ]
1>
1>  g:\ue4projects\manatechworkspace\source\mage\SteamManager.h(25): note: see reference to class template instantiation 'CCallbackManual<USteamManager,GameOverlayActivated_t,false>' being compiledG:\UE4Projects\ManaTechWorkspace\Source\Mage\SteamManager.h(25): note: see reference to class template instantiation 'CCallbackManual<USteamManager,GameOverlayActivated_t,false>' being compiled
1>
1>G:\Epic Games\UE_4.18\Engine\Source\ThirdParty/Steamworks/Steamv139/sdk/public/steam/steam_api.h(329): warning C4265: 'CCallback<T,P,false>': class has virtual functions, but destructor is not virtual
1>           instances of this class may not be destructed correctly
1>          with
1>          
1>              T=USteamManager,
1>              P=GameOverlayActivated_t
1>          ]
1>G:\Epic Games\UE_4.18\Engine\Source\ThirdParty/Steamworks/Steamv139/sdk/public/steam/steam_api.h(343): warning C4265: 'CCallbackManual<USteamManager,GameOverlayActivated_t,false>': class has virtual functions, but destructor is not virtual
1>           instances of this class may not be destructed correctly
1>G:\Epic Games\UE_4.18\Engine\Source\ThirdParty/Steamworks/Steamv139/sdk/public/steam/steam_api.h(329): warning C4265: 'CCallback<T,P,false>': class has virtual functions, but destructor is not virtual
1>           instances of this class may not be destructed correctly
1>          with
1>          
1>              T=USteamManager,
1>              P=GameOverlayActivated_t
1>          ]
1>G:\Epic Games\UE_4.18\Engine\Source\ThirdParty/Steamworks/Steamv139/sdk/public/steam/steam_api.h(343): warning C4265: 'CCallbackManual<USteamManager,GameOverlayActivated_t,false>': class has virtual functions, but destructor is not virtual
1>           instances of this class may not be destructed correctly
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\SteamManager.gen.cpp(50): error C2059: syntax error: ','
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\SteamManager.gen.cpp(50): error C2143: syntax error: missing ';' before '}'
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\SteamManager.gen.cpp(52): error C2065: 'NewProp_MTGameInstance': undeclared identifier
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\SteamManager.gen.cpp(59): error C2065: 'DependentSingletons': undeclared identifier
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\SteamManager.gen.cpp(59): error C2059: syntax error: ','
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\SteamManager.gen.cpp(67): error C2143: syntax error: missing ';' before '}'
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\SteamManager.gen.cpp(68): error C2065: 'OuterClass': undeclared identifier
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\SteamManager.gen.cpp(68): error C2065: 'ClassParams': undeclared identifier
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\SteamManager.gen.cpp(68): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\SteamManager.gen.cpp(68): error C2365: 'UE4CodeGen_Private::ConstructUClass': redefinition; previous definition was 'function'
1>  G:\Epic Games\UE_4.18\Engine\Source\Runtime\CoreUObject\Public\UObject/UObjectGlobals.h(2421): note: see declaration of 'UE4CodeGen_Private::ConstructUClass'
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\SteamManager.gen.cpp(68): error C2513: 'UE4CodeGen_Private::ConstructUClass': no variable declared before '='
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\SteamManager.gen.cpp(69): error C2059: syntax error: '}'
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\SteamManager.gen.cpp(69): error C2143: syntax error: missing ';' before '}'
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\SteamManager.gen.cpp(71): error C2059: syntax error: '}'
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\SteamManager.gen.cpp(71): error C2143: syntax error: missing ';' before '}'
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\MTGameInstance.gen.cpp(37): error C2059: syntax error: ')'
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\MTGameInstance.gen.cpp(59): error C2059: syntax error: ','
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\MTGameInstance.gen.cpp(59): error C2143: syntax error: missing ';' before '}'
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\MTGameInstance.gen.cpp(60): error C2065: 'FuncParams': undeclared identifier
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\MTGameInstance.gen.cpp(62): error C2059: syntax error: 'return'
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\MTGameInstance.gen.cpp(63): error C2059: syntax error: '}'
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\MTGameInstance.gen.cpp(63): error C2143: syntax error: missing ';' before '}'
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\MTGameInstance.gen.cpp(65): error C2143: syntax error: missing ';' before '{'
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\MTGameInstance.gen.cpp(65): error C2447: '{': missing function header (old-style formal list?)
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\MTGameInstance.gen.cpp(115): error C2059: syntax error: ','
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\MTGameInstance.gen.cpp(115): error C2143: syntax error: missing ';' before '}'
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\MTGameInstance.gen.cpp(122): error C2059: syntax error: ','
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\MTGameInstance.gen.cpp(122): error C2143: syntax error: missing ';' before '}'
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\MTGameInstance.gen.cpp(124): error C2065: 'NewProp_IsSteamOverlayActive': undeclared identifier
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\MTGameInstance.gen.cpp(125): error C2065: 'NewProp_SteamManager': undeclared identifier
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\MTGameInstance.gen.cpp(132): error C2065: 'DependentSingletons': undeclared identifier
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\MTGameInstance.gen.cpp(132): error C2059: syntax error: ','
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\MTGameInstance.gen.cpp(140): error C2143: syntax error: missing ';' before '}'
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\MTGameInstance.gen.cpp(140): error C2059: syntax error: '}'
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\MTGameInstance.gen.cpp(141): error C2065: 'OuterClass': undeclared identifier
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\MTGameInstance.gen.cpp(141): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\MTGameInstance.gen.cpp(141): error C2365: 'UE4CodeGen_Private::ConstructUClass': redefinition; previous definition was 'function'
1>  G:\Epic Games\UE_4.18\Engine\Source\Runtime\CoreUObject\Public\UObject/UObjectGlobals.h(2421): note: see declaration of 'UE4CodeGen_Private::ConstructUClass'
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\MTGameInstance.gen.cpp(141): error C2513: 'UE4CodeGen_Private::ConstructUClass': no variable declared before '='
1>G:\UE4Projects\ManaTechWorkspace\Intermediate\Build\Win64\UE4Editor\Inc\Mage\MTGameInstance.gen.cpp(141): fatal error C1903: unable to recover from previous error(s); stopping compilation
1>ERROR : UBT error : Failed to produce item: G:\UE4Projects\ManaTechWorkspace\Binaries\Win64\UE4Editor-Mage-3909.dll
1>  Total build time: 10.70 seconds (Local executor: 0.00 seconds)
1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets(41,5): error MSB3075: The command ""G:\Epic Games\UE_4.18\Engine\Build\BatchFiles\Build.bat" MageEditor Win64 Development "G:\UE4Projects\ManaTechWorkspace\Mage.uproject" -waitmutex" exited with code 5. Please verify that you have sufficient rights to run this command.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


I am not proficient at coding so you will have to explain any possible solutions like I am a 5 year old, apologies.

Thanks for your time.

Hi, I’m having the exact same problem, and would be nice to see if someone can help us.

Did anyone find solution to this? Having the same issue.