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"

Error for empty C++ class

I have created C++ class and can't compile project because of errors.

My header class:

 // Fill out your copyright notice in the Description page of Project Settings.
 #pragma once
 
 #include "BehaviorTree/Tasks/BTTask_BlackboardBase.h"
 #include "GetNextPoint.generated.h"
 
 UCLASS()
 class UGetNextPoint : public UBTTaskNode
 {
     GENERATED_BODY()
 
 };

My .cpp file

 // Fill out your copyright notice in the Description page of Project Settings.
 
 #include "MOBAVR.h"
 #include "GetNextPoint.h"

This is error log (here you can see many strange symbols like "ёё√ыър эр эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы", I don't understand what does they mean)

 Ошибка    LNK2019    ёё√ыър эр эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы "__declspec(dllimport) public: static wchar_t const * __cdecl UBTNode::StaticConfigName(void)" (__imp_?StaticConfigName@UBTNode@@SAPEB_WXZ) т ЇєэъЎшш "private: static class UClass * __cdecl UGetNextPoint::GetPrivateStaticClass(wchar_t const *)" (?GetPrivateStaticClass@UGetNextPoint@@CAPEAVUClass@@PEB_W@Z)    MOBAVR    E:\Projects\MOBAVR\Intermediate\ProjectFiles\MOBAVR.generated.cpp.obj    1    
 Ошибка    LNK2019    ёё√ыър эр эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы "__declspec(dllimport) class UClass * __cdecl Z_Construct_UClass_UBTTaskNode(void)" (__imp_?Z_Construct_UClass_UBTTaskNode@@YAPEAVUClass@@XZ) т ЇєэъЎшш "class UClass * __cdecl Z_Construct_UClass_UGetNextPoint(void)" (?Z_Construct_UClass_UGetNextPoint@@YAPEAVUClass@@XZ)    MOBAVR    E:\Projects\MOBAVR\Intermediate\ProjectFiles\MOBAVR.generated.cpp.obj    1    
 Ошибка    LNK2019    ёё√ыър эр эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы "__declspec(dllimport) public: static class UClass * __cdecl UBTTaskNode::StaticClass(void)" (__imp_?StaticClass@UBTTaskNode@@SAPEAVUClass@@XZ) т ЇєэъЎшш "private: static class UClass * __cdecl UGetNextPoint::GetPrivateStaticClass(wchar_t const *)" (?GetPrivateStaticClass@UGetNextPoint@@CAPEAVUClass@@PEB_W@Z)    MOBAVR    E:\Projects\MOBAVR\Intermediate\ProjectFiles\MOBAVR.generated.cpp.obj    1    
 Ошибка    LNK2019    ёё√ыър эр эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы "__declspec(dllimport) public: __cdecl UBTTaskNode::UBTTaskNode(class FObjectInitializer const &)" (__imp_??0UBTTaskNode@@QEAA@AEBVFObjectInitializer@@@Z) т ЇєэъЎшш "public: static void __cdecl UGetNextPoint::__DefaultConstructor(class FObjectInitializer const &)" (?__DefaultConstructor@UGetNextPoint@@SAXAEBVFObjectInitializer@@@Z)    MOBAVR    E:\Projects\MOBAVR\Intermediate\ProjectFiles\MOBAVR.generated.cpp.obj    1    
 Ошибка    LNK2019    ёё√ыър эр эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы "__declspec(dllimport) public: __cdecl UBTTaskNode::UBTTaskNode(class FVTableHelper &)" (__imp_??0UBTTaskNode@@QEAA@AEAVFVTableHelper@@@Z) т ЇєэъЎшш "public: __cdecl UGetNextPoint::UGetNextPoint(class FVTableHelper &)" (??0UGetNextPoint@@QEAA@AEAVFVTableHelper@@@Z)    MOBAVR    E:\Projects\MOBAVR\Intermediate\ProjectFiles\MOBAVR.generated.cpp.obj    1    
 Ошибка    LNK2019    ёё√ыър эр эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы "__declspec(dllimport) public: virtual __cdecl UBTTaskNode::~UBTTaskNode(void)" (__imp_??1UBTTaskNode@@UEAA@XZ) т ЇєэъЎшш "public: virtual void * __cdecl UGetNextPoint::`scalar deleting destructor'(unsigned int)" (??_GUGetNextPoint@@UEAAPEAXI@Z)    MOBAVR    E:\Projects\MOBAVR\Intermediate\ProjectFiles\MOBAVR.generated.cpp.obj    1    
 Ошибка    LNK2001    эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы ""protected: virtual enum EBTNodeResult::Type __cdecl UBTTaskNode::AbortTask(class UBehaviorTreeComponent &,unsigned char *)" (?AbortTask@UBTTaskNode@@MEAA?AW4Type@EBTNodeResult@@AEAVUBehaviorTreeComponent@@PEAE@Z)"    MOBAVR    E:\Projects\MOBAVR\Intermediate\ProjectFiles\MOBAVR.generated.cpp.obj    1    
 Ошибка    LNK2001    эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы ""public: virtual void __cdecl UBTNode::CleanupMemory(class UBehaviorTreeComponent &,unsigned char *,enum EBTMemoryClear::Type)const " (?CleanupMemory@UBTNode@@UEBAXAEAVUBehaviorTreeComponent@@PEAEW4Type@EBTMemoryClear@@@Z)"    MOBAVR    E:\Projects\MOBAVR\Intermediate\ProjectFiles\MOBAVR.generated.cpp.obj    1    
 Ошибка    LNK2001    эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы ""public: virtual void __cdecl UBTNode::DescribeRuntimeValues(class UBehaviorTreeComponent const &,unsigned char *,enum EBTDescriptionVerbosity::Type,class TArray<class FString,class FDefaultAllocator> &)const " (?DescribeRuntimeValues@UBTNode@@UEBAXAEBVUBehaviorTreeComponent@@PEAEW4Type@EBTDescriptionVerbosity@@AEAV?$TArray@VFString@@VFDefaultAllocator@@@@@Z)"    MOBAVR    E:\Projects\MOBAVR\Intermediate\ProjectFiles\MOBAVR.generated.cpp.obj    1    
 Ошибка    LNK2001    эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы ""public: virtual enum EBTNodeResult::Type __cdecl UBTTaskNode::ExecuteTask(class UBehaviorTreeComponent &,unsigned char *)" (?ExecuteTask@UBTTaskNode@@UEAA?AW4Type@EBTNodeResult@@AEAVUBehaviorTreeComponent@@PEAE@Z)"    MOBAVR    E:\Projects\MOBAVR\Intermediate\ProjectFiles\MOBAVR.generated.cpp.obj    1    
 Ошибка    LNK2001    эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы ""public: virtual class AActor * __cdecl UBTNode::GetGameplayTaskAvatar(class UGameplayTask const *)const " (?GetGameplayTaskAvatar@UBTNode@@UEBAPEAVAActor@@PEBVUGameplayTask@@@Z)"    MOBAVR    E:\Projects\MOBAVR\Intermediate\ProjectFiles\MOBAVR.generated.cpp.obj    1    
 Ошибка    LNK2001    эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы ""public: virtual unsigned char __cdecl UBTNode::GetGameplayTaskDefaultPriority(void)const " (?GetGameplayTaskDefaultPriority@UBTNode@@UEBAEXZ)"    MOBAVR    E:\Projects\MOBAVR\Intermediate\ProjectFiles\MOBAVR.generated.cpp.obj    1    
 Ошибка    LNK2001    эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы ""public: virtual class AActor * __cdecl UBTNode::GetGameplayTaskOwner(class UGameplayTask const *)const " (?GetGameplayTaskOwner@UBTNode@@UEBAPEAVAActor@@PEBVUGameplayTask@@@Z)"    MOBAVR    E:\Projects\MOBAVR\Intermediate\ProjectFiles\MOBAVR.generated.cpp.obj    1    
 Ошибка    LNK2001    эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы ""public: virtual class UGameplayTasksComponent * __cdecl UBTNode::GetGameplayTasksComponent(class UGameplayTask const &)const " (?GetGameplayTasksComponent@UBTNode@@UEBAPEAVUGameplayTasksComponent@@AEBVUGameplayTask@@@Z)"    MOBAVR    E:\Projects\MOBAVR\Intermediate\ProjectFiles\MOBAVR.generated.cpp.obj    1    
 Ошибка    LNK2001    эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы ""public: virtual unsigned short __cdecl UBTNode::GetInstanceMemorySize(void)const " (?GetInstanceMemorySize@UBTNode@@UEBAGXZ)"    MOBAVR    E:\Projects\MOBAVR\Intermediate\ProjectFiles\MOBAVR.generated.cpp.obj    1    
 Ошибка    LNK2001    эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы ""public: virtual class FName __cdecl UBTTaskNode::GetNodeIconName(void)const " (?GetNodeIconName@UBTTaskNode@@UEBA?AVFName@@XZ)"    MOBAVR    E:\Projects\MOBAVR\Intermediate\ProjectFiles\MOBAVR.generated.cpp.obj    1    
 Ошибка    LNK2001    эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы ""public: virtual unsigned short __cdecl UBTNode::GetSpecialMemorySize(void)const " (?GetSpecialMemorySize@UBTNode@@UEBAGXZ)"    MOBAVR    E:\Projects\MOBAVR\Intermediate\ProjectFiles\MOBAVR.generated.cpp.obj    1    
 Ошибка    LNK2001    эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы ""public: virtual class FString __cdecl UBTNode::GetStaticDescription(void)const " (?GetStaticDescription@UBTNode@@UEBA?AVFString@@XZ)"    MOBAVR    E:\Projects\MOBAVR\Intermediate\ProjectFiles\MOBAVR.generated.cpp.obj    1    
 Ошибка    LNK2001    эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы ""public: virtual class UWorld * __cdecl UBTNode::GetWorld(void)const " (?GetWorld@UBTNode@@UEBAPEAVUWorld@@XZ)"    MOBAVR    E:\Projects\MOBAVR\Intermediate\ProjectFiles\MOBAVR.generated.cpp.obj    1    
 Ошибка    LNK2001    эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы ""public: virtual void __cdecl UBTNode::InitializeFromAsset(class UBehaviorTree &)" (?InitializeFromAsset@UBTNode@@UEAAXAEAVUBehaviorTree@@@Z)"    MOBAVR    E:\Projects\MOBAVR\Intermediate\ProjectFiles\MOBAVR.generated.cpp.obj    1    
 Ошибка    LNK2001    эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы ""public: virtual void __cdecl UBTNode::InitializeMemory(class UBehaviorTreeComponent &,unsigned char *,enum EBTMemoryInit::Type)const " (?InitializeMemory@UBTNode@@UEBAXAEAVUBehaviorTreeComponent@@PEAEW4Type@EBTMemoryInit@@@Z)"    MOBAVR    E:\Projects\MOBAVR\Intermediate\ProjectFiles\MOBAVR.generated.cpp.obj    1    
 Ошибка    LNK2001    эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы ""public: virtual void __cdecl IGameplayTaskOwnerInterface::OnGameplayTaskActivated(class UGameplayTask &)" (?OnGameplayTaskActivated@IGameplayTaskOwnerInterface@@UEAAXAEAVUGameplayTask@@@Z)"    MOBAVR    E:\Projects\MOBAVR\Intermediate\ProjectFiles\MOBAVR.generated.cpp.obj    1    
 Ошибка    LNK2001    эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы ""public: virtual void __cdecl UBTTaskNode::OnGameplayTaskDeactivated(class UGameplayTask &)" (?OnGameplayTaskDeactivated@UBTTaskNode@@UEAAXAEAVUGameplayTask@@@Z)"    MOBAVR    E:\Projects\MOBAVR\Intermediate\ProjectFiles\MOBAVR.generated.cpp.obj    1    
 Ошибка    LNK2001    эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы ""public: virtual void __cdecl UBTNode::OnGameplayTaskInitialized(class UGameplayTask &)" (?OnGameplayTaskInitialized@UBTNode@@UEAAXAEAVUGameplayTask@@@Z)"    MOBAVR    E:\Projects\MOBAVR\Intermediate\ProjectFiles\MOBAVR.generated.cpp.obj    1    
 Ошибка    LNK2001    эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы ""public: virtual void __cdecl UBTNode::OnInstanceCreated(class UBehaviorTreeComponent &)" (?OnInstanceCreated@UBTNode@@UEAAXAEAVUBehaviorTreeComponent@@@Z)"    MOBAVR    E:\Projects\MOBAVR\Intermediate\ProjectFiles\MOBAVR.generated.cpp.obj    1    
 Ошибка    LNK2001    эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы ""public: virtual void __cdecl UBTNode::OnInstanceDestroyed(class UBehaviorTreeComponent &)" (?OnInstanceDestroyed@UBTNode@@UEAAXAEAVUBehaviorTreeComponent@@@Z)"    MOBAVR    E:\Projects\MOBAVR\Intermediate\ProjectFiles\MOBAVR.generated.cpp.obj    1    
 Ошибка    LNK2001    эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы ""protected: virtual void __cdecl UBTTaskNode::OnMessage(class UBehaviorTreeComponent &,unsigned char *,class FName,int,bool)" (?OnMessage@UBTTaskNode@@MEAAXAEAVUBehaviorTreeComponent@@PEAEVFName@@H_N@Z)"    MOBAVR    E:\Projects\MOBAVR\Intermediate\ProjectFiles\MOBAVR.generated.cpp.obj    1    
 Ошибка    LNK2001    эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы ""protected: virtual void __cdecl UBTTaskNode::OnTaskFinished(class UBehaviorTreeComponent &,unsigned char *,enum EBTNodeResult::Type)" (?OnTaskFinished@UBTTaskNode@@MEAAXAEAVUBehaviorTreeComponent@@PEAEW4Type@EBTNodeResult@@@Z)"    MOBAVR    E:\Projects\MOBAVR\Intermediate\ProjectFiles\MOBAVR.generated.cpp.obj    1    
 Ошибка    LNK2001    эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы ""public: virtual void __cdecl UBTNode::SetOwner(class AActor *)" (?SetOwner@UBTNode@@UEAAXPEAVAActor@@@Z)"    MOBAVR    E:\Projects\MOBAVR\Intermediate\ProjectFiles\MOBAVR.generated.cpp.obj    1    
 Ошибка    LNK2001    эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы ""protected: virtual void __cdecl UBTTaskNode::TickTask(class UBehaviorTreeComponent &,unsigned char *,float)" (?TickTask@UBTTaskNode@@MEAAXAEAVUBehaviorTreeComponent@@PEAEM@Z)"    MOBAVR    E:\Projects\MOBAVR\Intermediate\ProjectFiles\MOBAVR.generated.cpp.obj    1    
 Ошибка    LNK2001    эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы ""public: virtual bool __cdecl UBTNode::UsesBlueprint(void)const " (?UsesBlueprint@UBTNode@@UEBA_NXZ)"    MOBAVR    E:\Projects\MOBAVR\Intermediate\ProjectFiles\MOBAVR.generated.cpp.obj    1    
 Ошибка    LNK2001    эхЁрчЁх°хээ√щ тэх°эшщ ёшьтюы ""public: virtual class UObject * __cdecl UBTNode::_getUObject(void)const " (?_getUObject@UBTNode@@UEBAPEAVUObject@@XZ)"    MOBAVR    E:\Projects\MOBAVR\Intermediate\ProjectFiles\MOBAVR.generated.cpp.obj    1    
 Ошибка    LNK1120    эхЁрчЁх°хээ√ї тэх°эшї ¤ыхьхэЄют: 32    MOBAVR    E:\Projects\MOBAVR\Binaries\Win64\UE4Editor-MOBAVR-732.dll    1    
 Ошибка        Failed to produce item: E:\Projects\MOBAVR\Binaries\Win64\UE4Editor-MOBAVR-732.dll    MOBAVR    E:\Projects\MOBAVR\Intermediate\ProjectFiles\ERROR    1    
 Ошибка    MSB3075    Выход из команды ""E:\Epic Games\4.15.0-Seg\Engine\Build\BatchFiles\Build.bat" MOBAVREditor Win64 Development "E:\Projects\MOBAVR\MOBAVR.uproject" -waitmutex" с кодом 5. Убедитесь в наличии достаточных прав для выполнения данной команды.    MOBAVR    C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.MakeFile.Targets    41    


I am new in C++ for UE, any help would be appreciated! Thanks in advance.

Product Version: UE 4.15
Tags:
more ▼

asked Jun 03 '17 at 01:47 PM in C++ Programming

avatar image

Erumaru
590 9 9 41

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

2 answers: sort voted first

Did you include the "AIModule" in your Game.build.cs file?

 PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "AIModule" });

Also, the UBTaskNode class comes from:

 /BehaviorTree/BTTaskNode.h

Probably want to include:

 #include "BehaviorTree/BTTaskNode.h" 

in your class.

more ▼

answered Jun 03 '17 at 05:15 PM

avatar image

Vawx
361 11 8 21

avatar image Erumaru Jun 06 '17 at 06:05 AM

I think that adding AIModule would solve my problem, I will try and reply to you.

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

Make sure all other code files are free of errors, and also make sure you are running Visual Studio as admin. Then, try the compile button inside the engine. A restart might also help. I do remember encountering something similar to this a while back.

more ▼

answered Jun 03 '17 at 02:02 PM

avatar image

Reuben Ward
303 7 4 15

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
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