C++ Module / Plugin Project builds, but fails to load

Hello,

I’m working on a project on two different machines and syncing via a git repo.
One of the machines is running Windows 7 the other Windows 10.

The Project (Adding Flow Visualization functionality via C++) builds and runs without any problems on the Windows 7 machine. (Mainly being developed on this one.)

It builds without errors on the Windows 10 machine, but fails to load the editor around 70%.
I haven’t found much in any logs besides the following messages:

'UE4Editor.exe' (Win32): Loaded 'C:\BurningProgramming\FlowCraft-Unreal\Binaries\Win64\UE4Editor-FlowCraft-Win64-DebugGame.dll'. Symbols loaded.
'UE4Editor.exe' (Win32): Loaded 'C:\Program Files\Epic Games\4.9\Engine\Plugins\Runtime\ProceduralMeshComponent\Binaries\Win64\UE4Editor-ProceduralMeshComponent.dll'. Symbols loaded.
'UE4Editor.exe' (Win32): Unloaded 'C:\Program Files\Epic Games\4.9\Engine\Plugins\Runtime\ProceduralMeshComponent\Binaries\Win64\UE4Editor-ProceduralMeshComponent.dll'
'UE4Editor.exe' (Win32): Unloaded 'C:\BurningProgramming\FlowCraft-Unreal\Binaries\Win64\UE4Editor-FlowCraft-Win64-DebugGame.dll'
[2015.10.13-18.51.00:489][  0]LogModuleManager:Warning: ModuleManager: Unable to load module 'C:/BurningProgramming/FlowCraft-Unreal/Binaries/Win64/UE4Editor-FlowCraft-Win64-DebugGame.dll' because the file couldn't be loaded by the OS.

One notion I haven’t tried yet is that the path might be too long?
Are there any windows logs I could check that would have more information on loading the dll?

Does it have to do with switching between Windows7 and Windows10?

Thank you for your help.
Cheers,
John

[EDIT:]
The exact error message I get is:
“The game module ‘FlowCraft’ could not be loaded. There may be an operating system error or the module may not be properly set up.”

You use laucher build or source? Your module seems to be DebugGame build but you engine seems to be in “Development” build as dll don’t have build type surfix. You module need to be build in same build configuration as the engine.

You should try to run your project from VS with debugger attached. It may clear the cause of loading failure. I have one, was using “c++ shaders”, it was due to incorrect loading stage - projects with shaders should be loaded before Engine. And VS broke on a statement which prevents loading of a module with a reason.

Still UE should be more verbose on this errors.

Also deleting Build, Config, Saved and Intermediate folders may help. The general rule - delete all folders with generated content.

i’m building with the same setup on both machines, also tried every available configuration (except shipping).
Result:
Windows 7 machine: everything runs perfectly, just as before.

Windows 10 machine: build fine without errors, but same error on launch in every config.
I’m not building the whole engine from source on either machine, I added classes through the editor and then coded in Visual Studio.

I had the impression the debugger would attach automatically when I build and run from VS (F5 - start debugging). It does on the Windows 7 machine, and it says it does on the Windows 10 machine as well (Attached to process [8180] UE4Editor.exe), still doesn’t give me any errors inside visual studio, except for the output above.

I tried setting up a new clean project with c++ files through the launcher, and that works fine on both machines.

I have a feeling it might be my build.cs file, but I’m not sure what might be wrong.

using UnrealBuildTool;

public class FlowCraft : ModuleRules
{
	public FlowCraft(TargetInfo Target)
	{
		PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "ProceduralMeshComponent",
                    "RenderCore",
					"Renderer",
                    "ShaderCore",
                    "RHI" });

		PrivateDependencyModuleNames.AddRange(new string[] { "Renderer",  "UtilityShaders" });

		PrivateIncludePaths.AddRange(
			new string[] {
				"Runtime/Renderer/Private",
				"Runtime/Renderer/Private/CompositionLighting",
				"Runtime/Renderer/Private/PostProcess",
			}
		);
		PublicIncludePaths.Add( "../ThirdParty" );
		//PrivateIncludePaths.Add("../ThirdParty/vclibs/include");

		//### VC LIBS
		PublicLibraryPaths.Add("../ThirdParty/vclibs/libs");
		PublicAdditionalLibraries.Add("vclibs_base.x64.lib");
		PublicAdditionalLibraries.Add("vclibs_math.x64.lib");
		PublicAdditionalLibraries.Add("vclibs_appdb_dbcore.x64.lib");

		// ### NLOPT
		PublicLibraryPaths.Add("../ThirdParty/nlopt");
		PublicAdditionalLibraries.Add("libnlopt-0.lib");

	}
}

I ended up checking out every past commit until I found the one that broke it to track down the error.

Turns out there was a library I was using that didn’t load correctly unless it’s .dll was in the binaries folder.

Did you ever determine what could be causing this problem? I have the same problem, and manually copying DLLs into the Binaries folder each time seems a little heavy handed.

Not really.
It only applies to one of the libraries that I bind as a dynamic one (nlopt). the static and header ones are obviously fine. I haven’t really looked into it further.

I have written an answer how to find out the missing DLL here: https://answers.unrealengine.com/questions/44194/unable-to-load-module-because-the-file-couldnt-be.html#answer-420075

Thanks RebelMoogle. It worked for me in 4.13.