Hi,
I’m currently attempting to learn how to create customised nodes. To help learn this, I’ve grabbed the code from the sequence node that comes with UE4 (Copied and pasted the code over to my basic C++ project without any modifications). Unfortunately when I go to compile, I get the following error: error C4273: Inconsistent DLL linkage.
This error only appears on functions that have the BLUEPRINTGRAPH_API prefix. If I remove the prefix I can compile successfully, however when functions such as “AddPinToExecutionNode()” don’t have the BLUEPRINTGRAPH_API prefix, my custom node does not allow me to add output pins akin to what the sequence node does. The exact error:
error C4273: 'UK2_BasicTestNode::AddPinToExecutionNode': inconsistent dll linkage
Where UK2_BasicTestNode is my custom node that inherits from UK2Node. Thinking that it may have been due to modules that hadn’t been thrown into the build.cs file, I added in a myriad of modules: “Core”,
“CoreUObject”,
“InputCore”,
“Slate”,
“Engine”,
“AssetTools”,
“UnrealEd”, // for FAssetEditorManager
“KismetWidgets”,
“KismetCompiler”,
“BlueprintGraph”,
“GraphEditor”,
“Kismet”, // for FWorkflowCentricApplication
“PropertyEditor”,
“EditorStyle”,
“Slate”,
“SlateCore”,
“MovieSceneCore”,
“Sequencer”,
“DetailCustomizations”,
“Settings”,
“RenderCore”. Unfortunately this hasn’t assisted in the problem and I’m still getting the error. I’m assuming I’m missing some sort of dependency.
For the steps of what I’ve done to produce this error, I’ve performed the following:
- Created a basic C++ project
- Created a C++ class that inherits from UK2Node
- Copied/Pasted the source code from UE4’s implementation of the Sequence node and thrown it into my .h and .cpp files respectively
- I’ve added a large number of modules into the build file in an attempt to cover all bases.
Any help with this issue would be appreciated. Apologies if this is a newbie question. Thanks.