-
Notifications
You must be signed in to change notification settings - Fork 0
Linking static and dynamic C libraries
Thomas edited this page Jan 31, 2015
·
26 revisions
I: Create a "ThirdParty" folder in your UE4 project's source folder.
II: In the "ThirdParty" folder, create a folder that determines your libary's name.
III: In the library folder, create a C# build file - the name is the same as the folder's, the extension is ".build.cs".
IV: Create the build file for the libarary (see main aspects of the build file in the code comments) - See code block containing the build file at the bottom
V: Add the library to your project's build file
C# Build File Code
/* Copyright 1998-2014 Epic Games, Inc. All Rights Reserved. */
using UnrealBuildTool;
public class K4WLib : ModuleRules
{
public K4WLib(TargetInfo Target)
{
Type = ModuleType.External;
/* Path to the Kinect V2 SDK read from environment variable */
string SDKDIR = Utils.ResolveEnvironmentVariable("%KINECTSDK20_DIR%");
/* Change path format from Windows backslashes to forward slashes */
SDKDIR = SDKDIR.Replace("\\", "/");
if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
{
/* Add the SDK's include folder to the Unreal include paths. */
PublicIncludePaths.Add(SDKDIR+"inc/");
/* Use the fitting plattform suffix */
string PlatformPath = (Target.Platform == UnrealTargetPlatform.Win64) ? "x64/" : "x86/";
/* Path to the SDK's lib folder*/
string LibPath = SDKDIR+"Lib/"+PlatformPath;
/* Add the Kinect library path to Unreal's libarary paths */
PublicLibraryPaths.Add(LibPath);
/* Add the needed static library */
PublicAdditionalLibraries.Add("Kinect20.lib");
/* Path to the SDK's redistributable directory */
string redistPath = SDKDIR + "Redist/";
/* Add the VisualGestureBuilder dynamic library to Unreal's DLLs to be loaded. */
PublicDelayLoadDLLs.AddRange(new string[] { redistPath+"VGB/"+PlatformPath+"Kinect20.VisualGestureBuilder.dll" });
}
}
}
-
Introduction
-
Requirements & Approach
- Hard- & Software Setup
3.1 Tracking
3.2 Display
- Implementation
4.1 Core Application
4.2 Embodiment
4.3 Calibration (tbd)
- Tutorials
5.1 Useful links
5.2 General UE4 information/experiences
5.3 Connecting and using a tracking device
5.4 Basic Kinect Demo
5.5 Linking static and dynamic C++ libraries
5.6 Joint IDs
- Future potential