So I think that 99% is that I’m doing something wrong but I can’t understand what. So I was thinking about using SGraphNodeResizable as a base for some of my own classes. But when I tried to compile a project - it gave me whole lot of unresolved externals. But then I thought maybe I’m doing something wrong and I created a blank c++ project (well, not blank, it was third person, but it doesn’t matter). Then I added next in my build file:
PrivateDependencyModuleNames.AddRange(new string[] {
"Slate",
"SlateCore",
"PropertyEditor",
"UnrealEd",
"EditorStyle",
"GraphEditor",
"AssetTools",
});
I just copied that from my previous project. And then I added just this line to the constructor of game mode:
SGraphNodeComment SNode;
I didn’t forget about includes:
#include "SGraphNodeComment.h"
#include "SlateCore.h"
#include "SlateBasics.h"
And I pressed build. After that I received huge amount of errors:
I don’t think it’s normal, what’s wrong and how to fix it? Without that line (and include statement) everything compiles normally. Just including SGraphNodeComment.h will give those errors. And I used SGraphNodeComment, but SGraphNodeResizable doesn’t compile also. Just by including SGraphNodeResizable.h I receive this:
log2.txt
So how it can be fixed?
UPD.
So I’ve added a bunch of headers it complained about. So now extra includes look like this:
#include "EdGraph/EdGraphNodeUtils.h"
#include "ScopedTransaction.h"
#include "EditorStyleSet.h"
#include "SGraphNode.h"
#include "SGraphNodeResizable.h"
#include "SGraphNodeComment.h"
After that it compiled normally. But adding just one line breaks everything:
SGraphNodeComment SNode;
Now we get to the real question. Why I get all this unresolved externals?
Maybe I forgot to add somehting to the build file?