Il 'P1', version, does not match 'P2', version

I got these 3 errors after putting a static library with VS

Il ‘P1’, version ‘20221215’, does not match ‘P2’, version ‘20220715’
code generation error

Microsoft.MakeFile.targets(44, 5): [MSB3073] The command

“E:\IDE\UE_5.2\Engine\Build\BatchFiles\Build.bat *** Win64 DebugGame -Project=“E:\IDE\Epic Games\Projects UE*** 5.2***.uproject” -WaitMutex -FromMsBuild” exited with code 6.

  <Target Name="Build" DependsOnTargets="PrepareForNMakeBuild;ResolveReferences;GetTargetPath;$(PreNMakeBuildTarget)" Returns="$(NMakeManagedOutput)">
    <VCMessage Code="MSB8005" Type="Warning" Arguments="NMakeBuildCommandLine" Condition="'$(NMakeBuildCommandLine)'==''"/>
    <Exec Command="$(NMakeBuildCommandLine)" Condition="'$(NMakeUseOemCodePage)' == 'true' and '$(NMakeBuildCommandLine)'!=''"/> ------------------> Here Here Rider warns me.
    <Exec Command="$(NMakeBuildCommandLine)" UseUtf8Encoding="Always" StdErrEncoding="UTF-8" StdOutEncoding="UTF-8" Condition="'$(NMakeUseOemCodePage)' != 'true' and '$(NMakeBuildCommandLine)'!=''"/>
  </Target>

Related:


I’m trying to make a Wraper to call other libraries and have custom functions.
Now, when I just call the class, I can’t seem to as it throws the 3 errors above.
If I remove the line VS_55_TPL_TestClass OBJ; Works.
What I mean is that “for some reason I don’t get to know” Unreal Engine isn’t able to do it right.

  • I did it with VS with a static library (it has a mini framework) (it doesn’t work) compiled from VS
  • I did it with Rider library static library (doesn’t work) compiled from Rider.
    The error occurs at runtime (when it is executed).

I’ve read countless things, but I don’t think it’s the IDE itself. Since I did the test with both.
This has to be a bug in version 5.2. Otherwise, if it’s not a Bug, some Unreal expert can advise me. Although I doubt it’s not a bug.

Should I post it on Issues UE?

Steps in the above example:
1 - I create a “third party” library with the name VS_55_TPL_PluginR
2 - I create a static library inside “third party” called VS_55_TPL_PluginRLivrary
3 - I create a class (these are test classes) VS_55_TPL_TestClass.h/.cpp
4 - I fix the routes.
5 - From Unreal Engine I create a C++ object class for the project VS_55_TPL_PluginRLivrary called VS_55_TPL_SL_WO.h/.cpp
6 - From my Wrapper class VS_55_TPL_SL_WO.h I call VS_55_TPL_TestClass.h “Everything breaks here”