Unresolved external symbol _DllMainCRTStartup when adding external dependencies

Hello!

Ok so I’m trying to add “assimp” as a dependency for my project. So far I’ve written the build scripts for Linux, and it seems to work just fine

I’m currently writing build scripts for Windows, however I’m running into some issues. As far as I can tell, I build the assimp static libs just fine (As in assimp-vc140-mt.lib, IrrXML.lib, and zlibstatic.lib are created from the assimp build), however when trying to add the libraries/headers in UnrealBuildTool, it fails with “unresolved external symbol _DllMainCRTStartup” on linking UE4Editor-libassimp.dll

Furthermore, I also recieve “Cannot open include file ‘assimp/Importer.hpp’: No such file or directory” even though I’ve added the include path

From my libassimp.Build.cs

    Type = ModuleType.External;

    Definitions.Add("ASSIMP_BUILD_ASSIMP_TOOLS=FALSE");
    Definitions.Add("ASSIMP_BUILD_SAMPLES=FALSE");

    bAddDefaultIncludePaths = false;

    // ...

    if (Target.Platform == UnrealTargetPlatform.Win64) {
        PublicIncludePaths.Add(ModuleDirectory + "\\include\\");

        PublicAdditionalLibraries.Add(ModuleDirectory + "\\lib\\assimp.lib");
        PublicAdditionalLibraries.Add(ModuleDirectory + "\\lib\\IrrXML.lib");
        PublicAdditionalLibraries.Add(ModuleDirectory + "\\lib\\zlibstatic.lib");
    }

Problem solved - Looks like it didn’t like me setting the Type to External in .Build.cs

If anyone else stumbles by this, here’s my assimp module as a reference
Build scripts/module: https://github.com/UnrealMKB/UnrealMKB/tree/model-loading/UnrealMKB/Source/ThirdParty/libassimp
Git submodule for assimp is located in /ThirdParty/assimp of the repo

(If I forgot to update the link and that link leads to a 404, try this: https://github.com/UnrealMKB/UnrealMKB/tree/master/UnrealMKB/Source/ThirdParty/libassimp)

Hello there. I run into the same problem. May I ask you where did you found build.cs file for limp file? I don’t know where to find build.cs file for .dll file. Thanks