GAS NOMINMAX Error

Hi, I follow GAS Tutorial and every time I add UGameplayAbility , I encounter the following errors:

1>E:\Workspace\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\GameplayPrediction.h(393): error C4003: not enough arguments for function-like macro invocation 'max'
1>E:\Workspace\Engine\Source\Runtime\Core\Public\Misc\AssertionMacros.h(229): note: in expansion of macro 'check'
1>E:\Workspace\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\GameplayPrediction.h(393): error C2589: '(': illegal token on right side of '::'
1>E:\Workspace\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\GameplayPrediction.h(393): error C2062: type 'unknown-type' unexpected
1>E:\Workspace\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\GameplayPrediction.h(393): error C2059: syntax error: ')'
1>E:\Workspace\Engine\Plugins\Runtime\GameplayAbilities\Source\GameplayAbilities\Public\GameplayPrediction.h(393): error C2143: syntax error: missing ';' before '{'
1>Total time in Parallel executor: 3.79 seconds

I’m using UE 5.4.1 source code, I enabled plugin, added public dependencies, basically following Gameplay Ability System for Unreal Engine | Unreal Engine 5.4 Documentation | Epic Developer Community (epicgames.com) and after this step: Gameplay Ability System Component And Gameplay Attributes in Unreal Engine | Unreal Engine 5.4 Documentation | Epic Developer Community (epicgames.com) got above error.

Next step is to try with older Windows SDK.

Do you have any advice?

Thanks to Unreal Source guys I found that that windows.h was problem and I fixed it by changing it to MinWindows.h.

Leaving code, maybe someone could use it.

#include "CoreMinimal.h"
#include "UObject/NoExportTypes.h"
#include "Windows/MinWindows.h"

THIRD_PARTY_INCLUDES_START
#include <sql.h>
#include <sqlext.h>
THIRD_PARTY_INCLUDES_END

Greetings @Muata

I assume from the follow up post that you found your solution. We appreciate you posting it on here for other users! Have a great week!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.