-
-
Notifications
You must be signed in to change notification settings - Fork 103
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
Minor build error if compiled by WinXP-compatible MSVC v141_xp SDK #86
Comments
Hi! #if defined(_WIN32) && _MSC_VER <= 1916 // v141_xp
#include <ctype.h>
namespace std {
using ::tolower;
}
#else
#include <cctype>
#endif I have done some research: it seems that MSDN Link: https://learn.microsoft.com/en-us/cpp/overview/compiler-versions?view=msvc-170 |
I will test that, sure, but it's unclear to me why not directly use the C function that is compatible with everything, instead of adding more conditional compilation with somewhat unclear conditions. My patch was just
which is already proven to work everywhere. Are there some locale/Unicode interaction that C++ function covers but older C function doesn't? |
It's just a personal policy: in C++ codebases I prefer to use C++ includes (if possible) even if they are just wrapper/alias around C functions, in general I prefer to reduce C/C++ code mixing at minimum. If the conditional compilation doesn't work I will use |
Tried your patch variant, it works as expected. |
Hi @Dax89,
I've updated my local copy of QHexView to the current state, and it went mostly smoothly if not for one minor build issue when built with an obscure configuration.
As I'm still maintaining Windows XP compatibility for Win32 versions of
UEFITool
,UEFIExtract
andUEFIFind
, all libraries that are in use are built with an ancient v141_xp SDK that is still supported by MS in various Visual Studio releases. I will continue supporting it until GitHub stops providing a VM to build such binaries with, which will likely happen next year.Way back then,
tolower()
had not been a member ofstd
for MSVC, and I had to fall back to use the C version fromctype.h
to makeqhexutils.cpp
compile again. There are only 2 instances to replace:Thank you once again for this library, always a pleasure to use.
The text was updated successfully, but these errors were encountered: