Closed egorpugin closed 4 years ago
Removing ::
is not the correct solution since we are casting to _RTL_SRWLOCK
from Windows SDK, not from Boost.WinAPI. Same with functions.
I suspect, there's something odd with your Windows SDK if it indicates that it supports Windows Vista but doesn't define _RTL_SRWLOCK
and related API. What Windows SDK are you using and does it define _RTL_SRWLOCK
and under what conditions?
Removing :: is not the correct
That was a quick note.
What Windows SDK are you using and does it define _RTL_SRWLOCK and under what conditions?
I'm on the latest sdk - 10.0.19041. I think it's in global ns.
Upd.: Not sure, maybe just clang-cl issue? Since it's really from master.
10.0.19041 is a pre-release version, the latest release is 10.0.18362. I'm not seeing any test failures with clang-cl 10.0 from VS 2019 and Windows SDK 10.0.18362.
Can you try with the released clang-cl and Windows SDK?
10.0.19041 is offered from VS installer, since win10 2004 is released. Not sure if it's pre-release version. I'll try with different compiler and sdk and report back.
clang-cl 9.0 + winsdk 10.0.18362.0 gives same error. Maybe some boost header skipped or msvc/clang def is not working to do proper include order?
Command line + output (clang-cl 9.0 + winsdk 10.0.18362.0). https://pastebin.com/iHu4ihnF
In that log, I can see you're using clang 11, at least its headers are among the included ones.
I can see BOOST_USE_WINDOWS_H
is defined, and I can see boost/winapi/basic_types.hpp
gets included at some point, but I don't see windows.h
being included (which it should). Which makes me think this is either a compiler issue, or some sort of a preprocessor bug, or your Boost source was modified somehow.
Can you prepare a small reproducer test?
I did not change clang headers, just left them from clang-11. I'll try to minify.
Can you reproduce with vanilla released versions of components? No pre-released stuff, no leftover headers etc. please.
Switched clang headers, same result. (Minifying.)
Looks like I have such code to create error with clang cl (though msvc works).
#ifdef BOOST_USE_WINDOWS_H
#undef BOOST_USE_WINDOWS_H
#define REDEFINE_BOOST_USE_WINDOWS_H
#endif
#include <boost/stacktrace.hpp>
// remove following 3 lines to fix the issue with clang-cl
#ifdef REDEFINE_BOOST_USE_WINDOWS_H
#define BOOST_USE_WINDOWS_H
#endif
#include <boost/log/trivial.hpp>
Do not remember why I have such strange defs, maybe wrap older stacktrace versions. I use the latest boost. Removed them, works both on msvc/clang-cl.
Upd.: feel free to close, if you consider this not a bug.
Ok, I see. Thanks for investigating.
Clang-cl from master. Removing
::
fixes errors.