I declare in my module. h and .cpp a new log category. I use extern to let the compiler know it’s a global new log category.
In my .h that extends IModuleInterface
DECLARE_LOG_CATEGORY_EXTERN(name…, … , … )
In my .cpp
DEFINE_LOG_CATEGORY(name…);
But I get this error in every single file I use UE_LOG(name… , etc)
‘FLogCategoryname…’: is not a class name or a namespace
I fixed this by including the module .h into all cpp files where I use the UE_LOG. But some of them still don’t work and it’s included.
I find this really suspicious and it doesn’t look right to include the module main file like this. Any ideas?