x

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"

UInterface not compiling (even after all the tutorials)

Currently, this is what I have to create my interface :

//////////////.h file ://///////////////////////

 #pragma once
 
 
 #include "InputInterface.generated.h"
 
 /**
  * 
  */
 UINTERFACE(MinimalAPI)
 class UInputInterface : public UInterface
 {
     GENERATED_UINTERFACE_BODY()
     
 };
 
 class IInputInterface
 {
     GENERATED_IINTERFACE_BODY()
 };

//////////////////////////// .cpp ////////////////////////////

 #include "Ephemera.h"
 #include "InputInterface.h"
 
 UInputInterface::UInputInterface(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer)
 {
 
 }

I have read through all the tutorials regarding how to make and compile the UInterface (i.e. Rama, another help from this link https://answers.unrealengine.com/questions/186606/how-to-create-an-interface-in-c.html, etc.).

However, I keep getting the following error :

2>~\Unreal Projects\Ephemera\Source\Ephemera\Public/Controllers/Interfaces/InputInterface.h(22): error C2011: 'IInputInterface': 'class' type redefinition 2> ~\UnrealEngine-4.11\Engine\Source\Runtime\Core\Public\GenericPlatform/IInputInterface.h(59): note: see declaration of 'IInputInterface' 2>~\Unreal Projects\Ephemera\Source\Ephemera\Public\Controllers\Interfaces\InputInterface.h(22): error C2011: 'IInputInterface': 'class' type redefinition 2> ~\UnrealEngine-4.11\Engine\Source\Runtime\Core\Public\GenericPlatform/IInputInterface.h(59): note: see declaration of 'IInputInterface'

NOTE : My engine is from the source code via github (in other words, NOT from the launcher). Current version : 4.11.2

Product Version: UE 4.11
Tags:
more ▼

asked May 27 '16 at 07:30 PM in C++ Programming

avatar image

Ephemera_Devel
1 2 4

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

Nevermind, I have figured out the problem. Everything works now.

more ▼

answered May 27 '16 at 07:40 PM

avatar image

Ephemera_Devel
1 2 4

avatar image Vertex Soup Jul 27 '16 at 09:55 PM

Might want to elaborate how you solved it as I'm trying to figure out, I fount couple similar posts stating "I figure it out" but none of them offer any details how or what was wrong.. Thank you.

(comments are locked)
10|2000 characters needed characters left
Your answer
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