hello. working from this tutorial on how to link external DLL files. i have also dug through multiple other tutorials and posts here on answerhub.
trying to build throws the error
c:\[…]\BigNum_Test.Build.cs(35,13)
: error CS0149: Method name expected
the line in question
35) if ((Target.Platform == UnrealTargetPlatform.Win64)
i would also like to know if i have correctly changed line 53, “WITH_MPIR_LIB_BINDING={0}”, but i haven’t gotten that far yet. i need to fix this error first.
thanks for reading
using System.IO;
using UnrealBuildTool;
public class BigNum_Test : ModuleRules
{
//Convenience properties
private string ModulePath
{
get { return ModuleDirectory; }
}
private string ThirdPartyPath
{
get { return Path.GetFullPath(Path.Combine(ModulePath, "../../ThirdParty/")); }
}
// Constructor
public BigNum_Test(ReadOnlyTargetRules Target) : base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });
PrivateDependencyModuleNames.AddRange(new string[] { });
LoadMPIR(Target);
}
// Link to lib
public bool LoadMPIR(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, "MPIR", "lib");
PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "mpir." + PlatformString + ".lib"));
}
if (isLibrarySupported)
{
// Include path
PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, "MPIR", "include"));
}
PublicDefinitions.Add(string.Format("WITH_MPIR_LIB_BINDING={0}", isLibrarySupported ? 1 : 0));
return isLibrarySupported;
}
}