I just started working a new plugin for my project, and am just trying to build it initially right now so I can enable it in the editor and such.
I have the following classes
MyPlugin.h
#pragma once
#include "CoreMinimal.h"
#include "ModuleManager.h"
class FMyPluginModule : public IModuleInterface
{
public:
virtual void StartupModule() override;
virtual void ShutdownModule() override;
void PreUnloadCallback() override;
}
MyPlugin.cpp
#include "MyPlugin.h"
void FMyPluginModule::StartupModule()
{
}
void FMyPluginModule::ShutdownModule()
{
}
void FMyPluginModule::PreUnloadCallback()
{
IModuleInterface::PreUnloadCallback();
}
For some reason I get the following errors when trying to build:
Error C2371 ‘FMyPluginModule::StartupModule’: redefinition; different basic types
Error C2556 ‘FMyPluginModule FMyPluginModule::StartupModule(void)’: overloaded function differs only by return type from ‘voidFMyPluginModule::StartupModule(void)’
Error C2628 ‘FMyPluginModule’ followed by ‘void’ is illegal (did you forget a ‘;’?)
I don’t see where my function definition is changing at unless I’m missing something here.