编译plog错误
Posted 做个奇怪的人
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了编译plog错误相关的知识,希望对你有一定的参考价值。
需要更改一致性
1>D:\\testApps\\testApps\\include\\3rdpart\\ZLToolKit\\src\\Thread\\ThreadPool.h(107,27): warning C4018: “<”: 有符号/无符号不匹配
1>D:\\testApps\\testApps\\include\\3rdpart\\plog\\WinApi.h(112,46): error C2116: “InitializeCriticalSection”: 不同声明之间的函数参数列表不匹配
1>C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\synchapi.h(123): message : 参见“InitializeCriticalSection”的声明
1>D:\\testApps\\testApps\\include\\3rdpart\\plog\\WinApi.h(112,46): error C2733: “InitializeCriticalSection”: 无法重载具有外部 "C" 链接的函数
1>C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\synchapi.h(123,1): message : 参见“InitializeCriticalSection”的声明
1>D:\\testApps\\testApps\\include\\3rdpart\\plog\\WinApi.h(113,46): error C2116: “EnterCriticalSection”: 不同声明之间的函数参数列表不匹配
1>C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\synchapi.h(133): message : 参见“EnterCriticalSection”的声明
1>D:\\testApps\\testApps\\include\\3rdpart\\plog\\WinApi.h(113,46): error C2733: “EnterCriticalSection”: 无法重载具有外部 "C" 链接的函数
1>C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\synchapi.h(133,1): message : 参见“EnterCriticalSection”的声明
1>D:\\testApps\\testApps\\include\\3rdpart\\plog\\WinApi.h(114,46): error C2116: “LeaveCriticalSection”: 不同声明之间的函数参数列表不匹配
1>C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\synchapi.h(141): message : 参见“LeaveCriticalSection”的声明
1>D:\\testApps\\testApps\\include\\3rdpart\\plog\\WinApi.h(114,46): error C2733: “LeaveCriticalSection”: 无法重载具有外部 "C" 链接的函数
1>C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\synchapi.h(141,1): message : 参见“LeaveCriticalSection”的声明
1>D:\\testApps\\testApps\\include\\3rdpart\\plog\\WinApi.h(115,46): error C2116: “DeleteCriticalSection”: 不同声明之间的函数参数列表不匹配
1>C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\synchapi.h(194): message : 参见“DeleteCriticalSection”的声明
1>D:\\testApps\\testApps\\include\\3rdpart\\plog\\WinApi.h(115,46): error C2733: “DeleteCriticalSection”: 无法重载具有外部 "C" 链接的函数
1>C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\synchapi.h(194,1): message : 参见“DeleteCriticalSection”的声明
1>D:\\testApps\\testApps\\include\\3rdpart\\plog\\WinApi.h(121,49): error C2116: “RegCreateKeyExW”: 不同声明之间的函数参数列表不匹配
1>C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\winreg.h(346): message : 参见“RegCreateKeyExW”的声明
1>D:\\testApps\\testApps\\include\\3rdpart\\plog\\WinApi.h(121,49): error C2733: “RegCreateKeyExW”: 无法重载具有外部 "C" 链接的函数
1>C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\winreg.h(346,1): message : 参见“RegCreateKeyExW”的声明
1>D:\\testApps\\testApps\\include\\3rdpart\\plog\\WinApi.h(122,49): error C2116: “RegSetValueExW”: 不同声明之间的函数参数列表不匹配
1>C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\winreg.h(1009): message : 参见“RegSetValueExW”的声明
1>D:\\testApps\\testApps\\include\\3rdpart\\plog\\WinApi.h(122,49): error C2733: “RegSetValueExW”: 无法重载具有外部 "C" 链接的函数
1>C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\winreg.h(1009,1): message : 参见“RegSetValueExW”的声明
1>D:\\testApps\\testApps\\include\\3rdpart\\plog\\WinApi.h(123,49): error C2116: “RegCloseKey”: 不同声明之间的函数参数列表不匹配
1>C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\winreg.h(212): message : 参见“RegCloseKey”的声明
1>D:\\testApps\\testApps\\include\\3rdpart\\plog\\WinApi.h(123,49): error C2733: “RegCloseKey”: 无法重载具有外部 "C" 链接的函数
1>C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\winreg.h(212,1): message : 参见“RegCloseKey”的声明
1>D:\\testApps\\testApps\\include\\3rdpart\\plog\\WinApi.h(124,49): error C2116: “RegOpenKeyExW”: 不同声明之间的函数参数列表不匹配
1>C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\winreg.h(703): message : 参见“RegOpenKeyExW”的声明
1>D:\\testApps\\testApps\\include\\3rdpart\\plog\\WinApi.h(124,49): error C2733: “RegOpenKeyExW”: 无法重载具有外部 "C" 链接的函数
1>C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\winreg.h(703,1): message : 参见“RegOpenKeyExW”的声明
1>D:\\testApps\\testApps\\include\\3rdpart\\plog\\WinApi.h(125,49): error C2116: “RegDeleteKeyW”: 不同声明之间的函数参数列表不匹配
1>C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\winreg.h(412): message : 参见“RegDeleteKeyW”的声明
1>D:\\testApps\\testApps\\include\\3rdpart\\plog\\WinApi.h(125,49): error C2733: “RegDeleteKeyW”: 无法重载具有外部 "C" 链接的函数
1>C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\winreg.h(412,1): message : 参见“RegDeleteKeyW”的声明
1>D:\\testApps\\testApps\\include\\3rdpart\\plog\\WinApi.h(130,46): error C2116: “GetConsoleScreenBufferInfo”: 不同声明之间的函数参数列表不匹配
1>C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\consoleapi2.h(180): message : 参见“GetConsoleScreenBufferInfo”的声明
1>D:\\testApps\\testApps\\include\\3rdpart\\plog\\WinApi.h(130,46): error C2733: “GetConsoleScreenBufferInfo”: 无法重载具有外部 "C" 链接的函数
1>C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\consoleapi2.h(180,1): message : 参见“GetConsoleScreenBufferInfo”的声明
I just upgraded to the Visual Studio 2019 version 16,3 and I am now getting a number of errors reported in WinApi.h about a mismatch between that file and version 18362 of the Windows SDK (which I believe is also the latest). The errors were not there before I upgraded VS2019.
I\'ve tried the current vcpkg image and the latest github image as of the time I\'m writing this.
The errors are:
`
D:\\work\\github\\plog\\include\\plog\\WinApi.h(113,46): error C2116: \'InitializeCriticalSection\': function parameter lists do not match between declarations
C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\synchapi.h(123): message : see declaration of \'InitializeCriticalSection\'
D:\\work\\github\\plog\\include\\plog\\WinApi.h(113,46): error C2733: \'InitializeCriticalSection\': you cannot overload a function with \'C\' linkage
C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\synchapi.h(123,1): message : see declaration of \'InitializeCriticalSection\'
D:\\work\\github\\plog\\include\\plog\\WinApi.h(114,46): error C2116: \'EnterCriticalSection\': function parameter lists do not match between declarations
C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\synchapi.h(133): message : see declaration of \'EnterCriticalSection\'
D:\\work\\github\\plog\\include\\plog\\WinApi.h(114,46): error C2733: \'EnterCriticalSection\': you cannot overload a function with \'C\' linkage
C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\synchapi.h(133,1): message : see declaration of \'EnterCriticalSection\'
D:\\work\\github\\plog\\include\\plog\\WinApi.h(115,46): error C2116: \'LeaveCriticalSection\': function parameter lists do not match between declarations
C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\synchapi.h(141): message : see declaration of \'LeaveCriticalSection\'
D:\\work\\github\\plog\\include\\plog\\WinApi.h(115,46): error C2733: \'LeaveCriticalSection\': you cannot overload a function with \'C\' linkage
C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\synchapi.h(141,1): message : see declaration of \'LeaveCriticalSection\'
D:\\work\\github\\plog\\include\\plog\\WinApi.h(116,46): error C2116: \'DeleteCriticalSection\': function parameter lists do not match between declarations
C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\synchapi.h(194): message : see declaration of \'DeleteCriticalSection\'
D:\\work\\github\\plog\\include\\plog\\WinApi.h(116,46): error C2733: \'DeleteCriticalSection\': you cannot overload a function with \'C\' linkage
C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\synchapi.h(194,1): message : see declaration of \'DeleteCriticalSection\'
D:\\work\\github\\plog\\include\\plog\\WinApi.h(122,49): error C2116: \'RegCreateKeyExW\': function parameter lists do not match between declarations
C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\winreg.h(346): message : see declaration of \'RegCreateKeyExW\'
D:\\work\\github\\plog\\include\\plog\\WinApi.h(122,49): error C2733: \'RegCreateKeyExW\': you cannot overload a function with \'C\' linkage
C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\winreg.h(346,1): message : see declaration of \'RegCreateKeyExW\'
D:\\work\\github\\plog\\include\\plog\\WinApi.h(123,49): error C2116: \'RegSetValueExW\': function parameter lists do not match between declarations
C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\winreg.h(1009): message : see declaration of \'RegSetValueExW\'
D:\\work\\github\\plog\\include\\plog\\WinApi.h(123,49): error C2733: \'RegSetValueExW\': you cannot overload a function with \'C\' linkage
C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\winreg.h(1009,1): message : see declaration of \'RegSetValueExW\'
D:\\work\\github\\plog\\include\\plog\\WinApi.h(124,49): error C2116: \'RegCloseKey\': function parameter lists do not match between declarations
C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\winreg.h(212): message : see declaration of \'RegCloseKey\'
D:\\work\\github\\plog\\include\\plog\\WinApi.h(124,49): error C2733: \'RegCloseKey\': you cannot overload a function with \'C\' linkage
C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\winreg.h(212,1): message : see declaration of \'RegCloseKey\'
D:\\work\\github\\plog\\include\\plog\\WinApi.h(125,49): error C2116: \'RegOpenKeyExW\': function parameter lists do not match between declarations
C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\winreg.h(703): message : see declaration of \'RegOpenKeyExW\'
D:\\work\\github\\plog\\include\\plog\\WinApi.h(125,49): error C2733: \'RegOpenKeyExW\': you cannot overload a function with \'C\' linkage
C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\winreg.h(703,1): message : see declaration of \'RegOpenKeyExW\'
D:\\work\\github\\plog\\include\\plog\\WinApi.h(126,49): error C2116: \'RegDeleteKeyW\': function parameter lists do not match between declarations
C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\winreg.h(412): message : see declaration of \'RegDeleteKeyW\'
D:\\work\\github\\plog\\include\\plog\\WinApi.h(126,49): error C2733: \'RegDeleteKeyW\': you cannot overload a function with \'C\' linkage
C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\winreg.h(412,1): message : see declaration of \'RegDeleteKeyW\'
D:\\work\\github\\plog\\include\\plog\\WinApi.h(131,46): error C2116: \'GetConsoleScreenBufferInfo\': function parameter lists do not match between declarations
C:\\Program Files (x86)\\Windows Kits\\10\\Include\\10.0.18362.0\\um\\consoleapi2.h(180): message : see declaration of \'GetConsoleScreenBufferInfo\'
D:\\work\\github\\plog\\include\\plog\\WinApi.h(131,46): error C2733: \'GetConsoleScreenBufferInfo\': you cannot overload a function with \'C\' linkage
Sent from Mail for Windows 10 From: Dan Pike Sent: Tuesday, September 24, 2019 11:21 AM To: SergiusTheBest/plog Cc: Subscribed Subject: Re: [SergiusTheBest/plog] plog fails to compile on Windows withVisual Studio 2019 16.3 (#144) It seems that the problem is caused by enabling Conformance mode in the compiler. If I drop the requirement in my project (i.e. revert to the default setting), plog compiles fine. Personally, I\'m happy to disable conformance mode, so this isn\'t an issue for me any more. I must have selected it at some point in the past as an experiment while trying to track down some other bug in the past and then forgot about it. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
在vs2019上编译错误,作者说很:“我很高兴禁用一致性模式”
使用/permissive命令关闭一致性
**C/C++属性-》命令行-》/permissive **
以上是关于编译plog错误的主要内容,如果未能解决你的问题,请参考以下文章