# Dependencies into plugin

**URL:** <https://forums.unrealengine.com/t/dependencies-into-plugin/348909>\
**Category:** C++\
**Tags:** unreal-engine, UE4, CPP, question\
**Created:** [February 27, 2016, 10:50pm UTC](https://forums.unrealengine.com/t/dependencies-into-plugin/348909 "2016-02-27T22:50:14Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alexey\_Helmer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alexey\_Helmer](https://forums.unrealengine.com/u/Alexey_Helmer)\
**Post date:** [February 27, 2016, 10:50pm UTC](https://forums.unrealengine.com/t/dependencies-into-plugin/348909/1 "2016-02-27T22:50:14Z")

</div>

Hello, all!

I make plugin which have next struct:

Public/A.h

Public/A.cpp

Public/B.h

Public/B.cpp

I want make build dependencies my source code. For example, first make B.h and B.cpp, and then A.h and A.cpp.  
How I can do this? It possible ?

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [February 28, 2016, 3:15am UTC](https://forums.unrealengine.com/t/dependencies-into-plugin/348909/2 "2016-02-28T03:15:03Z")

</div>

It’s meaningless what you trying to do, the way how C++ compilation works, all cpp files are compiled to individual independent object files and at the end they are linked together to form final dll usally by single linker command, order of compilation does not matter.

If you really want them to be dependent the separate them in to separate modules.

If you want more help you need to explain why you exacly want to do that

---

<div class="post-metadata">

**Author:** ![Alexey\_Helmer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alexey\_Helmer](https://forums.unrealengine.com/u/Alexey_Helmer)\
**Post date:** [February 28, 2016, 4:56pm UTC](https://forums.unrealengine.com/t/dependencies-into-plugin/348909/3 "2016-02-28T16:56:27Z")

</div>

I try make plugin for ready c++ library, which makes with makefile ( a talk about [Voro++ - A 3D Voronoi cell software library](http://math.lbl.gov/voro++)). When I create blank plugin an try build, i get errors about duplicate symbols. I think about dependencies…

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [February 28, 2016, 5:15pm UTC](https://forums.unrealengine.com/t/dependencies-into-plugin/348909/4 "2016-02-28T17:15:07Z")

</div>

So duplication happens in voro++ or your code?

---

<div class="post-metadata">

**Author:** ![Alexey\_Helmer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alexey\_Helmer](https://forums.unrealengine.com/u/Alexey_Helmer)\
**Post date:** [February 28, 2016, 5:43pm UTC](https://forums.unrealengine.com/t/dependencies-into-plugin/348909/5 "2016-02-28T17:43:05Z")

</div>

In voro++. Can link after build plugin.

---

<div class="post-metadata">

**Author:** ![Alexey\_Helmer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alexey\_Helmer](https://forums.unrealengine.com/u/Alexey_Helmer)\
**Post date:** [February 28, 2016, 6:01pm UTC](https://forums.unrealengine.com/t/dependencies-into-plugin/348909/6 "2016-02-28T18:01:56Z")

</div>

For example:  
Info duplicate symbol \_\_ZN4voro13wall\_cylinder12point\_insideEddd in:/Voronoi/Plugins/VoroPP/Intermediate/Build/Mac/UE4Editor/Development/VoroPP/voro++.cc.o  
/Voronoi/Plugins/VoroPP/Intermediate/Build/Mac/UE4Editor/Development/VoroPP/wall.cc.o

---

<div class="post-metadata">

**Author:** ![Shadowriver](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Shadowriver](https://forums.unrealengine.com/u/Shadowriver)\
**Post date:** [February 28, 2016, 7:04pm UTC](https://forums.unrealengine.com/t/dependencies-into-plugin/348909/7 "2016-02-28T19:04:24Z")

</div>

It’s duplication inside voro++… hmmm can’t you build this library as a seperate project, compile it atleast to static link lib file and then use only headers in Unreal project and just link lib. It’s what this tutorial does:

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — https://unrealcommunity.wiki/! You will be able to find content from...

---

<div class="post-metadata">

**Author:** ![Alexey\_Helmer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alexey\_Helmer](https://forums.unrealengine.com/u/Alexey_Helmer)\
**Post date:** [February 28, 2016, 7:15pm UTC](https://forums.unrealengine.com/t/dependencies-into-plugin/348909/8 "2016-02-28T19:15:32Z")

</div>

Thank you!  
I think about static lib. This is my plan B ))) But firstly, i try make plugin. May be other people have a secret knowledge about my question.

---

<div class="post-metadata">

**Author:** ![Alexey\_Helmer](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Alexey\_Helmer](https://forums.unrealengine.com/u/Alexey_Helmer)\
**Post date:** [March 2, 2016, 10:30am UTC](https://forums.unrealengine.com/t/dependencies-into-plugin/348909/9 "2016-03-02T10:30:04Z")

</div>

I can solved the problem. It’s very easy )))  
I create folders for sources file (\*.cc, \*.c, \*.cpp and etc.) and get them files. Next, I get all headers in Source/Public.  
In \*.Build.cs a wrote:

```
PublicIncludePaths.AddRange(
			new string[] {
// objs=cell.o common.o container.o unitcell.o v_compute.o c_loops.o v_base.o wall.o pre_container.o container_prd.o
                "VoroPP/Cell",
                "VoroPP/Common",
                "VoroPP/Container",
                "VoroPP/UnitCell",
                "VoroPP/VCompute",
                "VoroPP/CLoop",
                "VoroPP/VBase",
                "VoroPP/Wall",
                "VoroPP/PreContainer",
                "VoroPP/ContainerPrd",
				"VoroPP/Public"
			}
			);

```

In comment a wrote all obj file needed for making lib
