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"

LINK ERROR when using plugin

Using the engine plugin, I created the object in the plugin compiler after the LINK ERROR, I like the following use:

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

And then create an instance of the plug-in that inherits from UObject:

 #include "TestNullProject.h"
 #include "TestNullProjectGameMode.h"
 #include "MyPluginObject.h"
 
 
 void ATestNullProjectGameMode::StartPlay()
 {
     Super::StartPlay();

     UMyPluginObject* MyPluginObject = NewObject<UMyPluginObject>();    
 }

LINKERROR appears at compile time:

 2>TestNullProjectGameMode.cpp.obj : error LNK2019: unresolved external symbol "private: static class UClass * __cdecl UMyPluginObject::GetPrivateStaticClass(wchar_t const *)" (?GetPrivateStaticClass@UMyPluginObject@@CAPEAVUClass@@PEB_W@Z),referenced in function "class UMyPluginObject * __cdecl NewObject<class UMyPluginObject>(class UObject *)" (??$NewObject@VUMyPluginObject@@@@YAPEAVUMyPluginObject@@PEAVUObject@@@Z) 
 2>D:\Unreal Projects\TestNullProject\Binaries\Win64\UE4Editor-TestNullProject-6519.dll : fatal error LNK1120: 1 unresolved externals
 2>ERROR : UBT error : Failed to produce item: D:\Unreal Projects\TestNullProject\Binaries\Win64\UE4Editor-TestNullProject-6519.dll

use it with wrong way?

Product Version: UE 4.14
Tags:
more ▼

asked Dec 08 '16 at 09:49 AM in C++ Programming

avatar image

Colocasia
1 1 2 3

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

1 answer: sort voted first

Ok, solved this:

In MyProject.build.cs I added the following lines:

 PrivateDependencyModuleNames.AddRange(new string[] { "UObjectPlugin" });
 PrivateIncludePathModuleNames.AddRange(new string[] { "UObjectPlugin" });
 

And then in the file which wanted to use this custom mesh component it was enough to include it like this:

 #include "MyPluginObject.h"



more ▼

answered Dec 10 '16 at 04:05 PM

avatar image

Colocasia
1 1 2 3

(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