Closed ghost closed 6 years ago
Did you try to debug this compilation error? If yes, I welcome a patch.
Unfortunately, I don't have a Windows system to test that at the moment.
Seems like a Visual Studio compiler bug. The compiler is satisfied if your code explicitly gives the namespace (Eigen::Map instead of just Map), or if you change your definition of Map to another name (e.g., Mapp - i.e., using Mapp = ::Eigen::Map
I successfully compiled this repo in Ubuntu and want to transfer the lib to windows. With Cmake and Visual Studio, I tried but got some errors that cannot compile. It takes me 3 days to work on this and still not working. The error is in this line (matrixbatch.h 108): this->row(b).noalias() = Map<MatrixBatchBase>(mat.data(), 1, mat.cols() * mat.rows());
"
Error C2672 'Eigen::PlainObjectBase<Eigen::Matrix<float,-1,-1,1,-1,-1>>::Map': no matching overloaded function found onmt c:\code\ctranslate\include\onmt\eigen\matrixbatch.h 108
Error C2975 'Eigen::PlainObjectBase<Eigen::Matrix<float,-1,-1,1,-1,-1>>::Map': invalid template argument for 'Outer', expected compile-time constant expression onmt c:\code\ctranslate\include\onmt\eigen\matrixbatch.h 108
"