Closed kunaltyagi closed 4 years ago
I just noticed there are also some WIN64
instances, like here: https://github.com/PointCloudLibrary/pcl/blob/master/surface/include/pcl/surface/3rdparty/opennurbs/opennurbs_system.h#L135
Are those valid?
That file also seems to indicate that windows.h
has nested includes that define WIN32
: https://github.com/PointCloudLibrary/pcl/blob/master/surface/include/pcl/surface/3rdparty/opennurbs/opennurbs_system.h#L142
I found an instance of
#ifndef WIN32
#define WIN32
#endif
in minwindefs.h
in the headers that come with mingw, so it does seem like both _WIN32
and WIN32
might appear on Windows platforms.
I'm not a windows user, but from an implementor's PoV, I'd not recommend to keep the un-underscored versions. Maybe someone else can chime in with the recommended course of action.
WIN32 is added manually to the [default CXX flag] (https://github.com/PointCloudLibrary/pcl/blob/fe10b7619db9a89831b5ad418a265272ea15581e/CMakeLists.txt#L88)s if compiler is MSCV.
And atleast here it ends up in the definitions:
Not sure if it applies to MSYS2/Mingw as @FSund uses?
CMAKE_COMPILER_IS_MSVC
is false for mingw, so I don't think I would have `WIN32
defined from there. That might be the reason for the issue I had in #3667.
Marking this as stale due to 30 days of inactivity. It will be closed in 7 days if no further activity occurs.
Your Environment
Context
Accidentally
WIN32
andWIN64
has been used for Windows OS detection instead of_WIN32
and_WIN64
(notice the underscore)Possible Solution
WIN32
with_WIN32