# (trueSKY) Using Plugin Classes in C++ Results in Unresolved Externals

**URL:** <https://forums.unrealengine.com/t/truesky-using-plugin-classes-in-c-results-in-unresolved-externals/463723>\
**Category:** Plugins\
**Tags:** unresolved-external-, unreal-engine, Plugins, question, CPP\
**Created:** [April 13, 2020, 5:14pm UTC](https://forums.unrealengine.com/t/truesky-using-plugin-classes-in-c-results-in-unresolved-externals/463723 "2020-04-13T17:14:07Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![i-ribeiro](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@i-ribeiro](https://forums.unrealengine.com/u/i-ribeiro)\
**Post date:** [April 13, 2020, 5:14pm UTC](https://forums.unrealengine.com/t/truesky-using-plugin-classes-in-c-results-in-unresolved-externals/463723/1 "2020-04-13T17:14:07Z")

</div>

I’m using trueSKY version 4.2 in my project and I cannot find any way to get it to compile. I have the plugin properly installed in both the Engine’s and Project’s Plugin directories, and I have added the TrueSkyPlugin module to my .Build.cs file. I’ve also tried adding it as a module in the project file to no avail.

It worked originally, and I don’t think I have made any changes to invoke this problem. I tried reinstalling the plugin in the Project/Plugins folder (using the copy I have in Engine/Plugins), but it didn’t work.

This is the build error:

```
error LNK2019: unresolved external symbol "__declspec(dllimport) public: void__cdecl ATrueSkySequenceActor::SetTime(float)" (__imp_?SetTime@ATrueSkySequenceActor@@QEAAXM@Z) referenced in function "public: void__cdecl AConditionsController::ApplyTimeOfDay(void)" (?ApplyTimeOfDay@AConditionsController@@QEAAXXZ)

```

It seems that trueSKY’s DLLs aren’t being read/written properly. Compiling through the editor results in new DLLs being written by the editor in Plugins/TrueSkyPlugin/Binaries/Win64 (UE4Editor-TrueSkyPlugin-001.dll, -002.dll, …).

Really not sure where to go from here, as there is very little info on this subject from what I can tell. Any help would be much appreciated. If you need any more information or context I’m willing to provide it.

---

<div class="post-metadata">

**Author:** ![i-ribeiro](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@i-ribeiro](https://forums.unrealengine.com/u/i-ribeiro)\
**Post date:** [April 13, 2020, 5:29pm UTC](https://forums.unrealengine.com/t/truesky-using-plugin-classes-in-c-results-in-unresolved-externals/463723/2 "2020-04-13T17:29:16Z")

</div>

I got it to work by removing an include to a TrueSkyPlugin header in one of my game module’s headers and instead used forward declaration and put the include in the respective source file.

Sample header file:

```
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "SampleHeader.generated.h"
    
class ATrueSkySequenceActor;

    ...

```

Sample source file:

```
#include "SampleHeader.h"
#include "TrueSkySequenceActor.h"

...
```
