Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Error Compiling Triangular_kernel.hpp on Windows #422
In triangular_kernel.hpp (line 657) the following function fails to compile as it is using the max macro from a windows header.
The workaround is to add
close to the top of the file
This is already done in
If mlpack is actually failing to compile, please attach a build log so I can dig deeper, but this is a problem that should not be happening.
// Use Armadillo's C++ version detection.
// Clean up unfortunate Windows preprocessor definitions, even if this file was
this must be done before including triangular_kernel.hpp not after as is done in core.hpp
error compiling lars.cpp
Error 7 error C2059: syntax error : '::' mlpack\mlpack-1.0.12\src\mlpack\core\kernels\triangular_kernel.hpp 64 1 mlpack
Ah, okay, now I understand better. The first patch was written on a plane waiting to take off so I'm not too surprised it didn't work perfectly. :)
I've taken a closer look at the situation and committed 8bd3f96. This removes the undef'ing of min/max entirely and sets
I don't see a quick way to move the inclusion of the system-dependent headers into timers.cpp, since the Timers class exposes some methods and has some members that require a definition of the