Hello, really struggling with this one. I’m using c++ for most things, so i have a few c++ classes and everything was working fine until today, when I’ve added a new class that inherits from Actor, something like the bog standard one:
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "MyActor.generated.h"
UCLASS()
class KIRIN_API AMyActor : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
AMyActor();
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
};
now this comes up whenever I try to compile:
G:\Unreal\UE_5.0\Engine\Source\Runtime\AudioMixer\Public\Quartz\AudioMixerQuantizedCommands.h(31):
error C2838: 'PlaySoundW': illegal qualified name in member declaration
G:\Unreal\UE_5.0\Engine\Source\Runtime\AudioMixer\Public\Quartz\AudioMixerQuantizedCommands.h(31):
error C2440: 'return': cannot convert from 'BOOL (__cdecl *)(LPCWSTR,HMODULE,DWORD)' to 'EQuartzCommandType'
G:\Unreal\UE_5.0\Engine\Source\Runtime\AudioMixer\Public\Quartz\AudioMixerQuantizedCommands.h(31):
note: There is no context in which this conversion is possible
I am using UE5.
I have not touched the engine code at all, furthermore, if I remove any other of my c++ classes, the compile works. It’s almost as if there’s a limit to how many files I can have. But surely, this cannot be the case? and it’s not even that many files.
I have even tried adding a standard cpp class that doesn’t have anything to do with unreal, like so:
// CppTest.h
#pragma once
class CppTest
{
public:
CppTest();
};
//CppTest.cpp
#include "CppTest.h"
CppTest::CppTest()
{
}
And it still fails with the exact same error.
Or even just adding an empty cpp file, also fails the build!
I am at my wits end here, I don’t even know where to start debugging this as this is so strange.
I’ve tried cleaning the solution, regenerating project files, removing intermediate, saved, binaries folders. It. Will. Not. Compile.
Any help at all would be greatly appreciated.