[mlpack-git] [mlpack] Building ml pack on Windows 7 (#421)

Ryan Curtin notifications at github.com
Thu Mar 19 23:34:52 EDT 2015


I hate to say this, but this is indeed a bug in the Visual Studio compiler.  Qiang's link is exactly the issue encountered here, and mtall's reply there is correct: Visual Studio should not be trying to implicitly cast an integer to `arma::span` when the constructor of `span` is marked `explicit`.

Digging a bit deeper, I discovered that this has been reported as a bug in the compiler:

https://connect.microsoft.com/VisualStudio/feedback/details/811334/bug-in-vs-2013-support-for-explicit-conversion-operators

See also this useful Stack Overflow post describing the exact compiler issue in more detail:

http://stackoverflow.com/questions/20498142/visual-studio-2013-explicit-keyword-bug

It may be possible to work around the issue, but this is only half of a solution.  Replace the line `if (x(1) == 0)` in `lars.cpp` (line 431) with `if (x[1] == 0)`.  That should (hopefully) resolve the issue, but I'm not certain.  You can use the same strategy (replace `()` with `[]`) for the `radical.cpp` error too.  If that doesn't fix it, the amount of voodoo necessary to make this compile simply isn't worth the time and you'll have to either find a more correct compiler or dig deep into the Armadillo sources to coax MSVC into compiling correctly.

Sorry for the bad news... :(

---
Reply to this email directly or view it on GitHub:
https://github.com/mlpack/mlpack/issues/421#issuecomment-83872456
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.cc.gatech.edu/pipermail/mlpack-git/attachments/20150319/c5e41a86/attachment.html>


More information about the mlpack-git mailing list