Closed skipik closed 4 years ago
The error text is saying your caches are outdated. You need to run build_clean.cmd or delete the \phlib\bin\ directory.
I also checked with the same versions as your screenshot and compiled fine:
Weird, I still have that error even on a new working copy...
Can you try recompiling \tools\thirdparty\thirdparty.sln before building the project?
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\winbase.h(9461,5): error C2220: the following warning is treated as an error (compiling source file jsonc\linkhash.c)
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\winbase.h(9461,5): warning C5105: macro expansion producing 'defined' has undefined behavior (compiling source file jsonc\linkhash.c)
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.19041.0\um\winbase.h(9461,5): message : to simplify migration, consider the temporary use of /Wv:18 flag with the version of the compiler with which you used to build without warnings (compiling source file jsonc\linkhash.c)
I get this while trying to compile debug | x64 | thirdparty.sln in VS 16.8.0. The same with 'release'
Looks like MS fucked it up with this major update 🤣
Looks like MS fucked it up with this major update
Someone at Microsoft forgot to backport some of the fixes to the Windows SDK when using the standards conformant preprocessor.
I get this while trying to compile debug
I've pushed a fix to disable those cplusplus macros when building the project. You should be able to compile both the main project and thirdparty?
You should be able to compile both the main project and thirdparty?
Yeah, I re-compiled thirdparty and now the main project builds correctly. Thank you! 👍
Aleksoid1978 ran into a similar problem when building a static library and described it on forum.ru-board.com:
Aleksoid1978
An interesting joke came out with VS 2019 v16.8.0 - in the project one of the "Project" type is configured as a makefile and body shirts with parameters for assembly are written, etc. If anything - it's ffmpeg for building into a static lib. Output has the correct file name. Other "Project" lists dependencies on this.
Before 16.8.0 everything worked fine, ffmpeg.lib was built and everything was clear when linking. On 16.8.0, ffmpeg.lib is assembled but does not participate in linking, the linker swears at the functions that are in it. These are the "pies". I had to work around - to register this ffmpeg.lib in projects.
I will probably continue to use 16.7.7 for now and will wait for the compiler to fix it - there is a bug in it, its authors should fix it ...
The way that worked in MPC-BE: https://sourceforge.net/p/mpcbe/code/5659/
For MS VS2019 v16.9.0 also needed:
1) run ./build/build_clean.cmd 2) run if needed my clean.cmd:
@echo off
rm -fr ./.vs > nul
rm -fr ./bin > nul
rm -fr ./ClientBin > nul
rm -fr ./phlib/bin > nul
rm -fr ./phlib/obj > nul
rm -fr ./ProcessHacker/obj > nul
rm -fr ./ProcessHacker/sdk/phapppub.h > nul
rm -fr ./tests/phlib-test/obj > nul
rm -fr ./tools/CustomSetupTool/bin > nul
rm -fr ./trunk/tools/CustomSetupTool/obj > nul
rm -fr ./tools/CustomCmdTool/bin > nul
rm -fr ./tools/CustomCmdTool/obj > nul
rm -fr ./tools/CustomCmdTool/.vs > nul
rm -fr ./tools/peview/obj > nul
rm -fr ./SDK > nul
for %%A in (
DotNetTools
ExtendedNotifications
ExtendedServices
ExtendedTools
HardwareDevices
NetworkTools
OnlineChecks
ToolStatus
Updater
UserNotes
WindowExplorer
) do if exist ./plugins/%%A (rm -fr ./plugins/%%A/obj > nul)
for %%A in (
AtomTablePlugin
AvgCpuPlugin
DbgViewPlugin
DnsCachePlugin
DpiAwarenessExtPlugin
ExtraCpuGraphsPlugin
FirmwarePlugin
GraphExplorerPlugin
GrowlNotifications
HexPidPlugin
MemoryExtPlugin
NvGpuPlugin
ObjectManagerPlugin
PerfMonPlugin
PipeEnumPlugin
PoolMonPlugin
ProductPolicyPlugin
ReparseEnumPlugin
ROTViewerPlugin
SbieSupport
SecurityExplorerPlugin
ServiceBackupRestorePlugin
SetCriticalPlugin
TaskbarExtPlugin
TerminatorPlugin
TrustedInstallerPlugin
WaitChainPlugin
) do if exist ./plugins-extra/%%A (rm -fr ./plugins-extra/%%A/obj > nul)
exit /b
3) rebuild ./tools/thirdparty/thirdparty.sln
or VS2019 v16.9 can't build phlib.lib
is it something on my side or should I just wait for the fix?