Closed jornb closed 4 years ago
Hello jornb,
usually the custom one is taken automatically, if make_unique
is not used from std
namespace.
The mscv compiler however takes the make_unique
from std
, regardless of using that std
namespace or not.
You cannot force the mscv compiler to take the C++11 standard, so it will take the std::make_unique
.(Forcing the compiler to lower C++ standards only works from C++17 to C++14, but not to C++11, stated here)
The best approach would be to upgrade to C++14 and use the std::make_unique
. As long we are running C++11 we will take your prefixing of the custom make_unique
, but are going to use the std::make_unique
when switching to C++14.
Best Regards Yasin
Fixed several build errors when compiling with MSVC on Windows.
I've tested this, and both the node and nodelets are working after building them with MSVC 2017 Professional on Windows 10.
Note: I'm not sure if this is the best way to fix these issues, but I'm simply posting this here for you to see and decide if we should continue with a preliminary windows support or not.
Changes
make_unique
clashes withstd::make_unique
. I just did a quick fix by prefixing all uses ofmake_unique
with::
.-DDWIN32_LEAN_AND_MEAN
compile definition on Windowsnear
andfar
as variable names (see Compiler error when using “near” as a variable name).-pedantic
-Wall
flag to avoid a large number of warnings -- at least until they are fixed.Remaining issues on MSVC
FindEnsenso.cmake
of Windows, as it does for Linux. However, I simply made my own and put it in my Ensenso install folder, using the Linux-one as a template.