x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

Linking .lib file, but opening file looks for .dll?

I'm trying to build a plugin called 'Kiface' using The Kinect 2.0 C++ SDK. I've added a dependancy in my plugin's build.cs file like so:

 using UnrealBuildTool;
 
 using System.IO;
 public class kiface : ModuleRules
 {
     public kiface(ReadOnlyTargetRules Target) : base(Target)
     {
         LoadKinectSDK(Target);
         PCHUsage = ModuleRules.PCHUsageMode.UseExplicitOrSharedPCHs;
         
         PublicIncludePaths.AddRange(
             new string[] {
                 "kiface/Public",
                 // ... add public include paths required here ...
             }
             );
 
         PrivateIncludePaths.AddRange(
             new string[] {
                 "kiface/Private",
                 // ... add other private include paths required here ...
             }
             );
             
         
         PublicDependencyModuleNames.AddRange(
             new string[]
             {
                 "Core",
                 // ... add other public dependencies that you statically link with here ...
             }
             );
             
         
         PrivateDependencyModuleNames.AddRange(
             new string[]
             {
                 "Projects",
                 "InputCore",
                 "UnrealEd",
                 "LevelEditor",
                 "CoreUObject",
                 "Engine",
                 "Slate",
                 "SlateCore",
                 // ... add private dependencies that you statically link with here ...    
             }
             );
         
         
         DynamicallyLoadedModuleNames.AddRange(
             new string[]
             {
                 // ... add any modules that your module loads dynamically here ...
             }
             );
     }
 
     private string ThirdPartyPath
     {
         get { return Path.GetFullPath(Path.Combine(ModulePath, "../../ThirdParty/")); }
     }
 
     private string ModulePath
     {
         get { return ModuleDirectory; }
     }
 
     public bool LoadKinectSDK(ReadOnlyTargetRules Target)
     {
         bool isLibrarySupported = false;
         if ((Target.Platform == UnrealTargetPlatform.Win64) || (Target.Platform == UnrealTargetPlatform.Win32))
         {
             isLibrarySupported = true;
             string PlatformString = (Target.Platform == UnrealTargetPlatform.Win64) ? "x64" : "x86";
             string LibrariesPath = Path.Combine(ThirdPartyPath, "Kinect", "lib", PlatformString);
             PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "Kinect20.lib"));
             PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "Kinect20.Face.lib"));
         }
         if (isLibrarySupported)
         {
             // Include path
             PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, "Kinect", "inc"));
         }
         Definitions.Add(string.Format("WITH_KINECT_SDK={0}", isLibrarySupported ? 1 : 0));
         return isLibrarySupported;
     }
 }

In this file the important lines are:

 PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "Kinect20.lib"));
 PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "Kinect20.Face.lib"));

And my project can build successfully, but when i try and open the project via the unreal editor, it tells me:

"Plugin 'kiface' failed to load because module 'kiface' could not be loaded. There may be an operating System error or the module may not be properly set up"

When i look at the log files i find this line:

 Missing import: Kinect20.dll

and

 Missing import: Kinect20.Face.dll

This makes sense why the project is crashing, because only Kinect20.lib and Kinect20.face.lib exist. But i specified them as .lib in the build.cs file, why is it trying to find .dll?

Product Version: UE 4.20
Tags:
more ▼

asked Aug 18 '18 at 08:26 PM in C++ Programming

avatar image

Half Blue Studio
1

avatar image meetakshay99 Dec 21 '18 at 12:57 PM

Did you find any solution for this? I too am facing exact same issue.. Linking .lib files but unreal looks for .dll ones.

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question