Il mismatch between 'P1' version '20231109' and 'P2' version '20230904'

Hello and many thanks in advance.

Similar to this

Up to date VS 2022.

I have a static library that was built 2 days ago on this machine.
Platform Toolset v143
Win SDK v 10.0.22621.0

I also have OpenSSL libs I’ve included, these were installed with vcpkg.

I’ve added my library to my UE project and when I build Development Editor Win64
I get this error during my build

|Error|C1900|Il mismatch between ‘P1’ version ‘20231109’ and ‘P2’ version ‘20230904’

Things I’ve tried::
Build static lib with 10.0 (installed latest) and 10.0.22621.0

Reinstall OpenSSL and set SDK
set VCPKG_CMAKE_SYSTEM_VERSION=10.0.22621.0

Add entries to vcxproj

$(BuildBatchScript) -Target=“UnrealEditor Win64 Development” -Target=“ShaderCompileWorker Win64 Development -Quiet” -WaitMutex -FromMsBuild -architecture=x64
$(RebuildBatchScript) -Target=“UnrealEditor Win64 Development” -Target=“ShaderCompileWorker Win64 Development -Quiet” -WaitMutex -FromMsBuild -architecture=x64
$(CleanBatchScript) -Target=“UnrealEditor Win64 Development” -Target=“ShaderCompileWorker Win64 Development -Quiet” -WaitMutex -FromMsBuild -architecture=x64
D:\repo\ue\UnrealEngine5.4_Source\Engine\Binaries\Win64\UnrealEditor.exe
v143
10.0.22621.0

The entries on vcxproj, were quite painful to add as I forgot twice(2x) that a ‘regenerate project files’ overwrites this

None of this seems to help me, I’m really stuck on this and would appreciate any guidance, please let me know if I can add more info.

A snippet from below solved it for me.

‘I had’ built the static library with the /GL (Whole Program Optimization) compiler switch, which requires Link Time Code Generation (/LTCG) when the static library is subsequently linked. These features require that all linked modules be built by the same version of the compiler. In fact, if precompiled headers are used, the same machine must build and link all the involved object code. Therefore, it is highly recommended that static libraries not be built with the /GL switch, since their intended use is quite frequently to support reuse by others.

So I turned off this switch on my static library, and subsequently was able to build and test.

https://developercommunity.visualstudio.com/t/cannot-build-after-vs-update-link-error/1348830

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.