• 微信公众号:美女很有趣。 工作之余,放松一下,关注即送10G+美女照片!

编译plog错误

开发技术 开发技术 3小时前 2次浏览
需要更改一致性

1>D:testAppstestAppsinclude3rdpartZLToolKitsrcThreadThreadPool.h(107,27): warning C4018: “<”: 有符号/无符号不匹配
1>D:testAppstestAppsinclude3rdpartplogWinApi.h(112,46): error C2116: “InitializeCriticalSection”: 不同声明之间的函数参数列表不匹配
1>C:Program Files (x86)Windows Kits10Include10.0.18362.0umsynchapi.h(123): message : 参见“InitializeCriticalSection”的声明
1>D:testAppstestAppsinclude3rdpartplogWinApi.h(112,46): error C2733: “InitializeCriticalSection”: 无法重载具有外部 “C” 链接的函数
1>C:Program Files (x86)Windows Kits10Include10.0.18362.0umsynchapi.h(123,1): message : 参见“InitializeCriticalSection”的声明
1>D:testAppstestAppsinclude3rdpartplogWinApi.h(113,46): error C2116: “EnterCriticalSection”: 不同声明之间的函数参数列表不匹配
1>C:Program Files (x86)Windows Kits10Include10.0.18362.0umsynchapi.h(133): message : 参见“EnterCriticalSection”的声明
1>D:testAppstestAppsinclude3rdpartplogWinApi.h(113,46): error C2733: “EnterCriticalSection”: 无法重载具有外部 “C” 链接的函数
1>C:Program Files (x86)Windows Kits10Include10.0.18362.0umsynchapi.h(133,1): message : 参见“EnterCriticalSection”的声明
1>D:testAppstestAppsinclude3rdpartplogWinApi.h(114,46): error C2116: “LeaveCriticalSection”: 不同声明之间的函数参数列表不匹配
1>C:Program Files (x86)Windows Kits10Include10.0.18362.0umsynchapi.h(141): message : 参见“LeaveCriticalSection”的声明
1>D:testAppstestAppsinclude3rdpartplogWinApi.h(114,46): error C2733: “LeaveCriticalSection”: 无法重载具有外部 “C” 链接的函数
1>C:Program Files (x86)Windows Kits10Include10.0.18362.0umsynchapi.h(141,1): message : 参见“LeaveCriticalSection”的声明
1>D:testAppstestAppsinclude3rdpartplogWinApi.h(115,46): error C2116: “DeleteCriticalSection”: 不同声明之间的函数参数列表不匹配
1>C:Program Files (x86)Windows Kits10Include10.0.18362.0umsynchapi.h(194): message : 参见“DeleteCriticalSection”的声明
1>D:testAppstestAppsinclude3rdpartplogWinApi.h(115,46): error C2733: “DeleteCriticalSection”: 无法重载具有外部 “C” 链接的函数
1>C:Program Files (x86)Windows Kits10Include10.0.18362.0umsynchapi.h(194,1): message : 参见“DeleteCriticalSection”的声明
1>D:testAppstestAppsinclude3rdpartplogWinApi.h(121,49): error C2116: “RegCreateKeyExW”: 不同声明之间的函数参数列表不匹配
1>C:Program Files (x86)Windows Kits10Include10.0.18362.0umwinreg.h(346): message : 参见“RegCreateKeyExW”的声明
1>D:testAppstestAppsinclude3rdpartplogWinApi.h(121,49): error C2733: “RegCreateKeyExW”: 无法重载具有外部 “C” 链接的函数
1>C:Program Files (x86)Windows Kits10Include10.0.18362.0umwinreg.h(346,1): message : 参见“RegCreateKeyExW”的声明
1>D:testAppstestAppsinclude3rdpartplogWinApi.h(122,49): error C2116: “RegSetValueExW”: 不同声明之间的函数参数列表不匹配
1>C:Program Files (x86)Windows Kits10Include10.0.18362.0umwinreg.h(1009): message : 参见“RegSetValueExW”的声明
1>D:testAppstestAppsinclude3rdpartplogWinApi.h(122,49): error C2733: “RegSetValueExW”: 无法重载具有外部 “C” 链接的函数
1>C:Program Files (x86)Windows Kits10Include10.0.18362.0umwinreg.h(1009,1): message : 参见“RegSetValueExW”的声明
1>D:testAppstestAppsinclude3rdpartplogWinApi.h(123,49): error C2116: “RegCloseKey”: 不同声明之间的函数参数列表不匹配
1>C:Program Files (x86)Windows Kits10Include10.0.18362.0umwinreg.h(212): message : 参见“RegCloseKey”的声明
1>D:testAppstestAppsinclude3rdpartplogWinApi.h(123,49): error C2733: “RegCloseKey”: 无法重载具有外部 “C” 链接的函数
1>C:Program Files (x86)Windows Kits10Include10.0.18362.0umwinreg.h(212,1): message : 参见“RegCloseKey”的声明
1>D:testAppstestAppsinclude3rdpartplogWinApi.h(124,49): error C2116: “RegOpenKeyExW”: 不同声明之间的函数参数列表不匹配
1>C:Program Files (x86)Windows Kits10Include10.0.18362.0umwinreg.h(703): message : 参见“RegOpenKeyExW”的声明
1>D:testAppstestAppsinclude3rdpartplogWinApi.h(124,49): error C2733: “RegOpenKeyExW”: 无法重载具有外部 “C” 链接的函数
1>C:Program Files (x86)Windows Kits10Include10.0.18362.0umwinreg.h(703,1): message : 参见“RegOpenKeyExW”的声明
1>D:testAppstestAppsinclude3rdpartplogWinApi.h(125,49): error C2116: “RegDeleteKeyW”: 不同声明之间的函数参数列表不匹配
1>C:Program Files (x86)Windows Kits10Include10.0.18362.0umwinreg.h(412): message : 参见“RegDeleteKeyW”的声明
1>D:testAppstestAppsinclude3rdpartplogWinApi.h(125,49): error C2733: “RegDeleteKeyW”: 无法重载具有外部 “C” 链接的函数
1>C:Program Files (x86)Windows Kits10Include10.0.18362.0umwinreg.h(412,1): message : 参见“RegDeleteKeyW”的声明
1>D:testAppstestAppsinclude3rdpartplogWinApi.h(130,46): error C2116: “GetConsoleScreenBufferInfo”: 不同声明之间的函数参数列表不匹配
1>C:Program Files (x86)Windows Kits10Include10.0.18362.0umconsoleapi2.h(180): message : 参见“GetConsoleScreenBufferInfo”的声明
1>D:testAppstestAppsinclude3rdpartplogWinApi.h(130,46): error C2733: “GetConsoleScreenBufferInfo”: 无法重载具有外部 “C” 链接的函数
1>C:Program Files (x86)Windows Kits10Include10.0.18362.0umconsoleapi2.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:workgithubplogincludeplogWinApi.h(113,46): error C2116: ‘InitializeCriticalSection’: function parameter lists do not match between declarations

C:Program Files (x86)Windows Kits10Include10.0.18362.0umsynchapi.h(123): message : see declaration of ‘InitializeCriticalSection’

D:workgithubplogincludeplogWinApi.h(113,46): error C2733: ‘InitializeCriticalSection’: you cannot overload a function with ‘C’ linkage

C:Program Files (x86)Windows Kits10Include10.0.18362.0umsynchapi.h(123,1): message : see declaration of ‘InitializeCriticalSection’

D:workgithubplogincludeplogWinApi.h(114,46): error C2116: ‘EnterCriticalSection’: function parameter lists do not match between declarations

C:Program Files (x86)Windows Kits10Include10.0.18362.0umsynchapi.h(133): message : see declaration of ‘EnterCriticalSection’

D:workgithubplogincludeplogWinApi.h(114,46): error C2733: ‘EnterCriticalSection’: you cannot overload a function with ‘C’ linkage

C:Program Files (x86)Windows Kits10Include10.0.18362.0umsynchapi.h(133,1): message : see declaration of ‘EnterCriticalSection’

D:workgithubplogincludeplogWinApi.h(115,46): error C2116: ‘LeaveCriticalSection’: function parameter lists do not match between declarations

C:Program Files (x86)Windows Kits10Include10.0.18362.0umsynchapi.h(141): message : see declaration of ‘LeaveCriticalSection’

D:workgithubplogincludeplogWinApi.h(115,46): error C2733: ‘LeaveCriticalSection’: you cannot overload a function with ‘C’ linkage

C:Program Files (x86)Windows Kits10Include10.0.18362.0umsynchapi.h(141,1): message : see declaration of ‘LeaveCriticalSection’

D:workgithubplogincludeplogWinApi.h(116,46): error C2116: ‘DeleteCriticalSection’: function parameter lists do not match between declarations

C:Program Files (x86)Windows Kits10Include10.0.18362.0umsynchapi.h(194): message : see declaration of ‘DeleteCriticalSection’

D:workgithubplogincludeplogWinApi.h(116,46): error C2733: ‘DeleteCriticalSection’: you cannot overload a function with ‘C’ linkage

C:Program Files (x86)Windows Kits10Include10.0.18362.0umsynchapi.h(194,1): message : see declaration of ‘DeleteCriticalSection’

D:workgithubplogincludeplogWinApi.h(122,49): error C2116: ‘RegCreateKeyExW’: function parameter lists do not match between declarations

C:Program Files (x86)Windows Kits10Include10.0.18362.0umwinreg.h(346): message : see declaration of ‘RegCreateKeyExW’

D:workgithubplogincludeplogWinApi.h(122,49): error C2733: ‘RegCreateKeyExW’: you cannot overload a function with ‘C’ linkage

C:Program Files (x86)Windows Kits10Include10.0.18362.0umwinreg.h(346,1): message : see declaration of ‘RegCreateKeyExW’

D:workgithubplogincludeplogWinApi.h(123,49): error C2116: ‘RegSetValueExW’: function parameter lists do not match between declarations

C:Program Files (x86)Windows Kits10Include10.0.18362.0umwinreg.h(1009): message : see declaration of ‘RegSetValueExW’

D:workgithubplogincludeplogWinApi.h(123,49): error C2733: ‘RegSetValueExW’: you cannot overload a function with ‘C’ linkage

C:Program Files (x86)Windows Kits10Include10.0.18362.0umwinreg.h(1009,1): message : see declaration of ‘RegSetValueExW’

D:workgithubplogincludeplogWinApi.h(124,49): error C2116: ‘RegCloseKey’: function parameter lists do not match between declarations

C:Program Files (x86)Windows Kits10Include10.0.18362.0umwinreg.h(212): message : see declaration of ‘RegCloseKey’

D:workgithubplogincludeplogWinApi.h(124,49): error C2733: ‘RegCloseKey’: you cannot overload a function with ‘C’ linkage

C:Program Files (x86)Windows Kits10Include10.0.18362.0umwinreg.h(212,1): message : see declaration of ‘RegCloseKey’

D:workgithubplogincludeplogWinApi.h(125,49): error C2116: ‘RegOpenKeyExW’: function parameter lists do not match between declarations

C:Program Files (x86)Windows Kits10Include10.0.18362.0umwinreg.h(703): message : see declaration of ‘RegOpenKeyExW’

D:workgithubplogincludeplogWinApi.h(125,49): error C2733: ‘RegOpenKeyExW’: you cannot overload a function with ‘C’ linkage

C:Program Files (x86)Windows Kits10Include10.0.18362.0umwinreg.h(703,1): message : see declaration of ‘RegOpenKeyExW’

D:workgithubplogincludeplogWinApi.h(126,49): error C2116: ‘RegDeleteKeyW’: function parameter lists do not match between declarations

C:Program Files (x86)Windows Kits10Include10.0.18362.0umwinreg.h(412): message : see declaration of ‘RegDeleteKeyW’

D:workgithubplogincludeplogWinApi.h(126,49): error C2733: ‘RegDeleteKeyW’: you cannot overload a function with ‘C’ linkage

C:Program Files (x86)Windows Kits10Include10.0.18362.0umwinreg.h(412,1): message : see declaration of ‘RegDeleteKeyW’

D:workgithubplogincludeplogWinApi.h(131,46): error C2116: ‘GetConsoleScreenBufferInfo’: function parameter lists do not match between declarations

C:Program Files (x86)Windows Kits10Include10.0.18362.0umconsoleapi2.h(180): message : see declaration of ‘GetConsoleScreenBufferInfo’

D:workgithubplogincludeplogWinApi.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错误
喜欢 (0)