C1047 on bilinearspan.lib with current compiler
See original GitHub issue- .NET Core Version: 5.0.100, per
global.json
. - Windows version: Windows 10 build 21277.100.
- Does the bug reproduce also in WPF for .NET Framework 4.8?: N/A, build-time issue.
Problem description
When I build my fork of WPF using the Release configuration, I see the error message listed below. (For some reason it works just fine in the Debug configuration.) I am using the MSVC compiler, version 19.28.29617, as included with Visual Studio 16.9.0 Preview 2.0.
Actual behavior
LINK : fatal error C1047: The object or library file 'C:\Users\William\.nuget\packages\runtime.win-x86.microsoft.dotnet
.wpf.dnceng\5.0.0-rtm.20560.4\runtimes\win-x86\native\bilinearspan.lib' was created by a different version of the compi
ler than other objects like 'D:\Projects\dotnet-wpf\artifacts\obj\wpfgfx\Win32\Release\precomp.obj'; rebuild all object
s and libraries with the same compiler [D:\Projects\dotnet-wpf\src\Microsoft.DotNet.Wpf\src\WpfGfx\core\dll\wpfgfx.vcxp
roj]
LINK : fatal error LNK1257: code generation failed [D:\Projects\dotnet-wpf\src\Microsoft.DotNet.Wpf\src\WpfGfx\core\dll
\wpfgfx.vcxproj]
Expected behavior
It should link.
Minimal repro
Checkout commit a6e62c39fab3f860a37c2f361fd225d52a982e4f
from wjk/dotnet-wpf. Run build.bat -c Release -pack -bl
. Observe the error.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:8 (8 by maintainers)
Top Results From Across the Web
Error C1047: Object file created with an older compiler than ...
This can happen if you begin using a new version of the compiler but do not do a clean rebuild of existing object...
Read more >How do you "rebuild old objects and libraries"?
Hi all, first time posting here. I'm trying to run my project in Release mode, but I keep getting a C1047 error: The...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Even if the lib is compiled without whole program optimization, the linker will still fail with LTCG if the compiler versions are different.
I’ll close this when I see the darc flow from the int repo. Thanks.