ue4plugins / NdiMedia

Media Framework plug-in for NewTek's Network Device Interface (NDI).
BSD 3-Clause "New" or "Revised" License
108 stars 36 forks source link

4.19 build errors #26

Open michela opened 6 years ago

michela commented 6 years ago

The UE4 4.19 build solution is unable to find Processing.NDI.Lib.h even after installing NDI Redist and the NDI SDK. Checked out tags/4.19 and trying to build project plugin with 4.19.2

Cannot open include file: 'Processing.NDI.Lib.h': No such file or directory

I've confirmed the system env variable NDI_SDK_DIR is set correctly (also tried copying to a user env variable)

NDI_SDK_DIR=D:\Program Files\NewTek\NewTek NDI SDK

Any advice?

Lewkas commented 6 years ago

You can add the plugin to a new project, and get it in the new project. Then, copy the plugin in your project, and you should be able to open it.

This video uses the trick for another plugin, follow the first steps for yours : https://www.youtube.com/watch?v=DRtkq0ewTz4&feature=youtu.be

I don't know why it would work, still it worked for me. Hope this helps, Lewkas

patlj09 commented 6 years ago

I'm having the same issue on Mac, wasn't sure I had the env. var. set though. Added it to .bash_profile but I'm not sure when it would be required to be set. While generating project files (Xcode), or while compiling.

I'm sure it's a trivial thing once I got it figured out. But your report michela makes me think things are not as they should.

Could I make the NDI SDK a third party module which NdiMedia depends on?

cheers, Patric

patlj09 commented 6 years ago

Issue with environment variable NDI_SDK_DIR under MacOS

After some continued digging I found that when the UBT runs under Xcode or triggered via Epic Launcher, as libraries need to be compiled, environment variables in ~/.bash_profile are not picked up. And after some hours of googling, where and how to set env. vars for non-terminal applications is still unclear, the methods have changed over MacOS versions. Nothing have worked for me.

My final solution will be to include under ThirdParty in my project.

I changed to the following in NdiMedia.Build.cs under Source/NdiMedia:

    string SdkDir = Environment.ExpandEnvironmentVariables("%NDI_SDK_DIR%");
    if (SdkDir == "%NDI_SDK_DIR%") {
        System.Console.WriteLine("NdiMedia: Error: NDI_SDK_DIR environment variable not set\n");
        PrivateIncludePaths.Add("/NewTek NDI SDK/include");
    }
    else
    {
        PrivateIncludePaths.Add(Path.Combine(SdkDir, "include"));
        System.Console.WriteLine("NdiMedia: NDI_SDK_DIR = \"" + SdkDir + "\"\n");
    }