-
-
Notifications
You must be signed in to change notification settings - Fork 118
_WIN32 vs. _MSC_VER #224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Well, there is no right or wrong.
|
Sure, but how would I know? All the Windows code I have been writing came either from somebody else or I have been guessing from docs and snippets here or there. Can we try compiling with clang or gcc on Windows and see what works and what doesn't? |
As far as I see, there are no _MSC_VER specific version checks now (we assume Visual Studio 2015 or later to have base C++ 11). |
@alex85k Not sure what you mean with "no _MSC_VER specific version checks now" ? I count 20 mentionings of the |
Yes, Visual Studio VS 2015 Update 1 and 2017 deploy 'flavour' of clang (Clang with Microsoft CodeGen). Why not add clang-based build job to the AppVeyor where clang 3.8 is available. Boost Hana can provide example of config: https://github.com/boostorg/hana/blob/master/.appveyor.yml |
I mean there are no checking of compiler version. The reason to use _MSC_VER was tht thing like unistd existed for mingw but not for Visual Studio. Most of checks can be with _WIN32 but not all. |
To check vs+clang on Appveyor we'll most likely need to rebuild dependency pack with clang... |
Now that we are testing with GCC in the Msys2 environment, I think we can close this issue. If somebody wants to provide a clang build script for Appveyor, please go ahead. But the |
Previously we used `WIN32`, which sometimes does exist, but according to https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=vs-2019 `_WIN32` is the one that is actually provided by the compiler. Closes #1676.
The libosmium code contains some places with
#ifdef _WIN32
and others with#ifdef _MSC_VER
. According to cxong/tinydir#18, which I just stumbled upon, this is probably false.Shall we change all
_MSC_VER
to_WIN32
or are there some cases where_MSC_VER
is actually correct?/cc @BergWerkGIS @alex85k
The text was updated successfully, but these errors were encountered: