# link error: LinkGraphNodesFromMaterial unresolved external symbol

**URL:** <https://forums.unrealengine.com/t/link-error-linkgraphnodesfrommaterial-unresolved-external-symbol/327481>\
**Category:** Rendering\
**Tags:** build-error, unreal-engine, editor, CPP, question, linking-error\
**Created:** [August 3, 2015, 11:27am UTC](https://forums.unrealengine.com/t/link-error-linkgraphnodesfrommaterial-unresolved-external-symbol/327481 "2015-08-03T11:27:02Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![MilosBulatF](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MilosBulatF](https://forums.unrealengine.com/u/MilosBulatF)\
**Post date:** [August 3, 2015, 11:27am UTC](https://forums.unrealengine.com/t/link-error-linkgraphnodesfrommaterial-unresolved-external-symbol/327481/1 "2015-08-03T11:27:02Z")

</div>

Hi,

I need the function LinkGraphNodesFromMaterial to update a graph in my plugin. However, during build, it reports:

error LNK2019: unresolved external symbol “public: void \_\_cdecl UMaterialGraph::LinkGraphNodesFromMaterial(void)” (?LinkGraphNodesFromMaterial@UMaterialGraph@@QEAAXXZ) referenced in function “void \_\_cdecl LinkToColorImage(class IMaterialEditor \*,struct FColorMaterialInput &,class UTexture \*,enum EMaterialSamplerType)” (?LinkToColorImage@@YAXPEAVIMaterialEditor@@AEAUFColorMaterialInput@@PEAVUTexture@@W4EMaterialSamplerType@@@Z)

I have set my plugin Type to editor.

I have included “MaterialGraph/MaterialGraph.h”

I have added “UnrealEd” module to dependencies.

But no work, and it seems that all the MaterialGraph function related objs are not linked.

Any ideas? Thanks!

PS: My full list of refed modules is :  
PublicDependencyModuleNames.AddRange(new string[] { “Engine”, “Core”, “LevelEditor”, “Slate”, “EditorStyle”, “XmlParser”, “ImageWrapper”, “CoreUObject”, “UnrealEd”, “MaterialEditor”, “DesktopPlatform”});

---

<div class="post-metadata">

**Author:** ![MilosBulatF](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MilosBulatF](https://forums.unrealengine.com/u/MilosBulatF)\
**Post date:** [August 3, 2015, 11:37am UTC](https://forums.unrealengine.com/t/link-error-linkgraphnodesfrommaterial-unresolved-external-symbol/327481/2 "2015-08-03T11:37:38Z")

</div>

I noticed that MaterialGraph has a tag “MinimalAPI”, so that the LinkGraphNodesFromMaterial can not be called.

How can I do the same thing without calling this function?

I was just following:  
[https://github.com/EpicGames/UnrealEngine/blob/master/Engine/Source/Editor/MaterialEditor/Private/Tests/MaterialEditorTests.cpp#L48](https://github.com/EpicGames/UnrealEngine/blob/master/Engine/Source/Editor/MaterialEditor/Private/Tests/MaterialEditorTests.cpp#L48)

---

<div class="post-metadata">

**Author:** ![MilosBulatF](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MilosBulatF](https://forums.unrealengine.com/u/MilosBulatF)\
**Post date:** [August 3, 2015, 3:11pm UTC](https://forums.unrealengine.com/t/link-error-linkgraphnodesfrommaterial-unresolved-external-symbol/327481/3 "2015-08-03T15:11:09Z")

</div>

I have found an alternative way to achieve the link and update by using MaterialExpression and PostEditChange

---

<div class="post-metadata">

**Author:** ![pengyancai](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@pengyancai](https://forums.unrealengine.com/u/pengyancai)\
**Post date:** [August 28, 2015, 6:35am UTC](https://forums.unrealengine.com/t/link-error-linkgraphnodesfrommaterial-unresolved-external-symbol/327481/4 "2015-08-28T06:35:23Z")

</div>

hello,Do you solve this problem?

---

<div class="post-metadata">

**Author:** ![MilosBulatF](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MilosBulatF](https://forums.unrealengine.com/u/MilosBulatF)\
**Post date:** [August 28, 2015, 9:11am UTC](https://forums.unrealengine.com/t/link-error-linkgraphnodesfrommaterial-unresolved-external-symbol/327481/5 "2015-08-28T09:11:19Z")

</div>

Yes and it is a work around. LinkGraphNodesFromMaterial is by design can not be used.
