I cloned the Bitbucket repository and tried to compile the following program in Visual Studio 2013 preview in 64-bit mode: #include <Eigen/Dense> int main() { } There were a lot of errors. The first few were: 1>h:\petter\eigen\eigen\src/Core/util/XprHelper.h(388): error C3771: 'CwiseUnaryOp' : friend declaration cannot be found in the nearest namespace scope 1> h:\petter\eigen\eigen\src/Core/util/XprHelper.h(391) : see reference to class template instantiation 'Eigen::internal::special_scalar_op_base<Derived,Scalar,OtherScalar,true>' being compiled 1>h:\petter\eigen\eigen\src/Core/util/XprHelper.h(388): error C2059: syntax error : '<' 1>h:\petter\eigen\eigen\src/Core/util/XprHelper.h(390): error C2334: unexpected token(s) preceding '{'; skipping apparent function body There were also a huge number of warnings of the type: warning C4180: qualifier applied to function type has no meaning; ignored
I should add that I had the same problem in the stable Eigen 3.1.
We don't have MSCV 2013, so could you attach the entire error log.
For the first error, can you try the following fix in file XprHelper.h, line 388: inline friend const Eigen::CwiseUnaryOp<scalar_multiple2_op<Scalar,OtherScalar>, Derived> operator*(const OtherScalar& scalar, const Derived& matrix) { return static_cast<const special_scalar_op_base&>(matrix).operator*(scalar); } I simply added Eigen:: to CwiseUnaryOp.
The preview version of MSVC 2013 is free. I am attaching the full error log.
Created attachment 364 [details] Compilation errors
I'm not sure if we should make this block 3.2 as long as the compiler is a "preview". Does MS have some kind of support page, where you can complain that "MSVS'13 fails to compile things which MSVS'12 does"? Maybe after trying to get a smaller failing example.
oh, it's in a preview stage. so yes, it's not a blocker.
Important information I just discovered trying to reproduce this on my main computer: The compilation errors only appear when compiling without language extensions (standard mode) with the /Za compiler switch. That switch is not on by default.
(In reply to comment #8) > The compilation errors only appear when compiling without language extensions > (standard mode) with the /Za compiler switch. That switch is not on by default. Did someone check if disabling language extensions also makes MSVC 2012 and earlier fail? That would contradict our claim to be standard C++98 or MS' claim to fulfill the standard in /Za mode.
For me, it fails in MSVC 2012 as well with the /Za switch. Perhaps the title of this bug should be changed?
ok, so what about my suggestion in comment #3? does it fix the first error? If so fixing the others should be as easy as this one.
Gael, adding Eigen:: fixes that error. The only errors I get now are Compiler Error C2373. For example, error C2373: 'Eigen::DenseBase<Derived>::Constant' : redefinition; different type modifiers : see declaration of 'Eigen::DenseBase<Derived>::Constant' http://msdn.microsoft.com/en-us/library/k6z2ykx4(v=vs.71).aspx Seems related to: http://eigen.tuxfamily.org/bz/show_bug.cgi?id=158 http://forum.kde.org/viewtopic.php?f=74&t=92782 http://forum.kde.org/viewtopic.php?f=74&t=91333
-- GitLab Migration Automatic Message -- This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/627.