Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Overloaded function differs only by return type

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


 #pragma once
 #include "CoreMinimal.h"
 #include "ModuleManager.h"
 class FMyPluginModule : public IModuleInterface
     virtual void StartupModule() override;
     virtual void ShutdownModule() override;
     void PreUnloadCallback() override;


 #include "MyPlugin.h"
 void FMyPluginModule::StartupModule()
 void FMyPluginModule::ShutdownModule()
 void FMyPluginModule::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.

Product Version: UE 4.20
more ▼

asked Sep 15 '18 at 11:34 AM in C++ Programming

avatar image

6 3

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question