How To link library in Build.cs correctly?

I have an external C++ library that I bind to my UE project in my Build.cs file like so:

            PublicAdditionalLibraries.Add(@"C:/Data/UnrealProjects/SpatialServer/x64/DebugGame_Game/SHARED_DATA_LIBRARY.lib");

which works. However I have not been able to use a relative path here. I tried anything I could think of but I always get a “lib not found” error, the absolute path is the only thing that works for me.

How can I link relative? To what basedirectory do I have to construct the relative path?

Thanks

Hi Wallenstein
isnt hard at all, I am using this:
string ThirdParty = Path.GetFullPath(Path.Combine(ModuleDirectory, “…/…/ThirdParty/”));

the ModuleDirectory variable leads you to where is your .uplugin file, from there I have my libs, inside a folder called ThirdParty, and I am using System.IO in order to manage my strings,
In addition you can print the string with Console.writeline() in c#

Thanks alot, that did the trick. I have no knowledge of C# but this worked pretty smooth.