ICode9

精准搜索请尝试: 精确搜索
首页 > 其他分享> 文章详细

编译plog错误

2021-06-11 11:02:19  阅读:292  来源: 互联网

标签:WinApi 错误 Windows testApps 编译 plog error include


需要更改一致性

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 **

标签:WinApi,错误,Windows,testApps,编译,plog,error,include
来源: https://www.cnblogs.com/beweirdo/p/14874241.html

本站声明: 1. iCode9 技术分享网(下文简称本站)提供的所有内容,仅供技术学习、探讨和分享;
2. 关于本站的所有留言、评论、转载及引用,纯属内容发起人的个人观点,与本站观点和立场无关;
3. 关于本站的所有言论和文字,纯属内容发起人的个人观点,与本站观点和立场无关;
4. 本站文章均是网友提供,不完全保证技术分享内容的完整性、准确性、时效性、风险性和版权归属;如您发现该文章侵犯了您的权益,可联系我们第一时间进行删除;
5. 本站为非盈利性的个人网站,所有内容不会用来进行牟利,也不会利用任何形式的广告来间接获益,纯粹是为了广大技术爱好者提供技术内容和技术思想的分享性交流网站。

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有