I’ve got an existing codebase I’m trying to compile as an Unreal module, mainly so we can keep developing this code in combination with our Unreal plugin, with the benefit of live coding. Unfortunately, when I disable PCH in a non-unity build, I’m getting weird errors to do with the <MODULE_NAME>_API macro that allows functions and classes to be exported from the module.
The gist of it seems to be that DLLEXPORT
, which the macro expands to, is not defined; I’m on Windows, so it should be getting __declspec(dllexport)
from Windows/WindowsPlatform.h
, but for some reason this isn’t happening. I haven’t been able to track down what should be including WindowsPlatform, and I’m wary of doing it manually as this is clearly something that should “just work”. Any ideas?
Edit: This seems to be triggered by wrapping #include "CoreMinimal.h"
in #ifdef UE_GAME
… is there some other way I can conditionally include CoreMinimal?