The game module 'myProjet' could not be loaded

Hi,

I have modify my build.cs to add some librairies and includes to my project and now i have this error : 'The game module ‘myProjet’ could not be loaded. I can’t find the solution please help me.

using System.IO;
using UnrealBuildTool;

public class CurubiShowroomv01 : ModuleRules
{
    public CurubiShowroomv01(TargetInfo Target)
    {
        PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "UMG", "Slate", "SlateCore" });

    }
    private string ModulePath
    {
        get
        {
            RulesAssembly r;
            FileReference CheckProjectFile;
            UProjectInfo.TryGetProjectForTarget("CurubiShowroomv01", out CheckProjectFile);

            r = RulesCompiler.CreateProjectRulesAssembly(CheckProjectFile);
            FileReference f = r.GetModuleFileName(this.GetType().Name);
            //File.WriteAllText("c:/temp/qqq2.txt", f.CanonicalName );

            string ModulePath = Path.GetDirectoryName(f.CanonicalName);
            return ModulePath;
        }
    }

    private string ThirdPartyPath
    {
        get { return Path.GetFullPath(Path.Combine(ModulePath, "../../ThirdParty/")); }
    }
    public bool LoadMySql(TargetInfo 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, "MySql", "Libraries");

            PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "libmysql.lib"));
            PublicAdditionalLibraries.Add(Path.Combine(LibrariesPath, "mysqlclient.lib"));
        }

        if (isLibrarySupported)
        {
            // Include path
            PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, "MySql", "Includes"));
        }

        Definitions.Add(string.Format("WITH_My_Sql_BINDING={0}", isLibrarySupported ? 1 : 0));

        return isLibrarySupported;
    }
}

Thanks.

Hello,

I have a few questions to help clarify this issue:

  • What exactly are you trying to accomplish?
  • What changes did you make to your build.cs file?
  • If you revert these changes, do you see any errors appear?
  • Have you ensured that you are searching the correct file paths?

Also, any more information you can provide would be helpful. Thank you

I try to link my librairies to my unreal project, when i revert my changes, the program cant compile cause he cant find this librairies and im sure its the good path.
Currently, my project compile but when he launch the editor i have this error.

Thanks for help and sorry for my english

To add my librairies i followed this tutorial : https://wiki.unrealengine.com/Linking_Static_Libraries_Using_The_Build_System

  • Have you tried Generating Project Files again after making these changes?
  • Have you attempted to reproduce this in a clean project with no additional content to see if you get the same results?

i will try to reproduce this in a clean project, thanks.

i Don’t have the error with a clean projet, i don’t know where is the source of the problem.

Hello,

Since you are not experiencing this error in a clean project, I recommend attempting to migrate over your assets from the affected project, or just attempting to recreate that project in a new one. It could be that there is an issue with the project itself that is causing this error to appear, or maybe there was a small mistake in following the guide that led to the error.

If after migrating your content/recreating the project you still are experiencing this error, feel free to reopen this thread and I’ll be glad to continue to investigate.

Have a great day

ok Thanks for your help.