mimesis-inria / caribou

Multi-physics computation library
GNU Lesser General Public License v3.0
29 stars 17 forks source link

[All] Add compilation support for Windows/MSVC #35

Closed epernod closed 3 years ago

epernod commented 3 years ago

This is for an out of source build of the plugin on windows. There are still several compilation errors:

Severity    Code    Description Project File    Line    Suppression State
Error   C1903   unable to recover from previous error(s); stopping compilation  Plugin  C:\projects\caribou\src\Plugin\Forcefield\FictitiousGridElasticForce.cpp    478 
Error (active)  E0443   too many arguments for alias template "caribou::mechanics::elasticity::strain::Matrix"  Plugin  C:\projects\caribou_build\src\Mechanics\include\Caribou\Mechanics\Elasticity\Strain.h   48  
Error (active)  E0443   too many arguments for alias template "caribou::mechanics::elasticity::strain::Matrix"  Plugin  C:\projects\caribou_build\src\Mechanics\include\Caribou\Mechanics\Elasticity\Strain.h   48  
Error   C2244   'SofaCaribou::topology::FictitiousGrid<DataTypes>::get_subcells_elements': unable to match function definition to an existing declaration (compiling source file C:\projects\caribou\src\Plugin\Topology\FictitiousGrid.cpp)    Plugin  C:\projects\caribou\src\Plugin\Topology\FictitiousGrid.inl  753 
Error   C3536   'J': cannot be used before it is initialized (compiling source file C:\projects\caribou\src\Plugin\Forcefield\HyperelasticForcefield.cpp)   Plugin  C:\projects\caribou_build\src\Plugin\include\SofaCaribou\Forcefield\HyperelasticForcefield.inl  353 
Error   C3536   'J': cannot be used before it is initialized (compiling source file C:\projects\caribou\src\Plugin\Forcefield\FictitiousGridHyperelasticForce.cpp)  Plugin  C:\projects\caribou_build\src\Plugin\include\SofaCaribou\Forcefield\HyperelasticForcefield.inl  353 
Error   C2789   'J': an object of const-qualified type must be initialized (compiling source file C:\projects\caribou\src\Plugin\Forcefield\HyperelasticForcefield.cpp) Plugin  C:\projects\caribou_build\src\Plugin\include\SofaCaribou\Forcefield\HyperelasticForcefield.inl  347 
Error   C2789   'J': an object of const-qualified type must be initialized (compiling source file C:\projects\caribou\src\Plugin\Forcefield\FictitiousGridHyperelasticForce.cpp)    Plugin  C:\projects\caribou_build\src\Plugin\include\SofaCaribou\Forcefield\HyperelasticForcefield.inl  347 
Error   C3016   'hexa_id': index variable in OpenMP 'for' statement must have signed integral type  Plugin  C:\projects\caribou\src\Plugin\Forcefield\FictitiousGridElasticForce.cpp    452 
Error   C2530   'F': references must be initialized (compiling source file C:\projects\caribou\src\Plugin\Forcefield\HyperelasticForcefield.cpp)    Plugin  C:\projects\caribou_build\src\Plugin\include\SofaCaribou\Forcefield\HyperelasticForcefield.inl  346 
Error   C2530   'F': references must be initialized (compiling source file C:\projects\caribou\src\Plugin\Forcefield\FictitiousGridHyperelasticForce.cpp)   Plugin  C:\projects\caribou_build\src\Plugin\include\SofaCaribou\Forcefield\HyperelasticForcefield.inl  346 
Error   C3536   'F': cannot be used before it is initialized (compiling source file C:\projects\caribou\src\Plugin\Forcefield\HyperelasticForcefield.cpp)   Plugin  C:\projects\caribou_build\src\Plugin\include\SofaCaribou\Forcefield\HyperelasticForcefield.inl  347 
Error   C3536   'F': cannot be used before it is initialized (compiling source file C:\projects\caribou\src\Plugin\Forcefield\FictitiousGridHyperelasticForce.cpp)  Plugin  C:\projects\caribou_build\src\Plugin\include\SofaCaribou\Forcefield\HyperelasticForcefield.inl  347 
Error   C2782   'Eigen::Matrix<double,Dimension,Dimension,0,_Rows,_Cols> caribou::mechanics::elasticity::strain::F(const Eigen::Matrix<SofaCaribou::forcefield::FictitiousGridElasticForce::Real,nRows,nColumns,Options,_Rows,_Cols> &,const Eigen::Matrix<SofaCaribou::forcefield::FictitiousGridElasticForce::Real,nRows,nColumns,Options,_Rows,_Cols> &)': template parameter '_Rows' is ambiguous   Plugin  C:\projects\caribou\src\Plugin\Forcefield\FictitiousGridElasticForce.cpp    338 
Error   C2784   'Eigen::Matrix<double,Dimension,Dimension,0,_Rows,_Cols> caribou::mechanics::elasticity::strain::F(const Eigen::Matrix<SofaCaribou::forcefield::FictitiousGridElasticForce::Real,nRows,nColumns,Options,_Rows,_Cols> &,const Eigen::Matrix<SofaCaribou::forcefield::FictitiousGridElasticForce::Real,nRows,nColumns,Options,_Rows,_Cols> &)': could not deduce template argument for 'const Eigen::Matrix<SofaCaribou::forcefield::FictitiousGridElasticForce::Real,nRows,nColumns,Options,_Rows,_Cols> &' from 'const Eigen::Matrix<SofaCaribou::forcefield::FictitiousGridElasticForce::Real,8,3,1,8,3>'  Plugin  C:\projects\caribou\src\Plugin\Forcefield\FictitiousGridElasticForce.cpp    338 
Error   C2782   'Eigen::Matrix<double,Dimension,Dimension,0,_Rows,_Cols> caribou::mechanics::elasticity::strain::F(const Eigen::Matrix<double,nRows,nColumns,Options,_Rows,_Cols> &,const Eigen::Matrix<double,nRows,nColumns,Options,_Rows,_Cols> &)': template parameter '_Rows' is ambiguous (compiling source file C:\projects\caribou\src\Plugin\Forcefield\HyperelasticForcefield.cpp)    Plugin  C:\projects\caribou_build\src\Plugin\include\SofaCaribou\Forcefield\HyperelasticForcefield.inl  346 
Error   C2782   'Eigen::Matrix<double,Dimension,Dimension,0,_Rows,_Cols> caribou::mechanics::elasticity::strain::F(const Eigen::Matrix<double,nRows,nColumns,Options,_Rows,_Cols> &,const Eigen::Matrix<double,nRows,nColumns,Options,_Rows,_Cols> &)': template parameter '_Rows' is ambiguous (compiling source file C:\projects\caribou\src\Plugin\Forcefield\FictitiousGridHyperelasticForce.cpp)   Plugin  C:\projects\caribou_build\src\Plugin\include\SofaCaribou\Forcefield\HyperelasticForcefield.inl  346 
Error   C2784   'Eigen::Matrix<double,Dimension,Dimension,0,_Rows,_Cols> caribou::mechanics::elasticity::strain::F(const Eigen::Matrix<double,nRows,nColumns,Options,_Rows,_Cols> &,const Eigen::Matrix<double,nRows,nColumns,Options,_Rows,_Cols> &)': could not deduce template argument for 'const Eigen::Matrix<double,nRows,nColumns,Options,_Rows,_Cols> &' from 'const Eigen::Matrix<double,8,3,0,8,3>' (compiling source file C:\projects\caribou\src\Plugin\Forcefield\HyperelasticForcefield.cpp) Plugin  C:\projects\caribou_build\src\Plugin\include\SofaCaribou\Forcefield\HyperelasticForcefield.inl  346 
Error   C2784   'Eigen::Matrix<double,Dimension,Dimension,0,_Rows,_Cols> caribou::mechanics::elasticity::strain::F(const Eigen::Matrix<double,nRows,nColumns,Options,_Rows,_Cols> &,const Eigen::Matrix<double,nRows,nColumns,Options,_Rows,_Cols> &)': could not deduce template argument for 'const Eigen::Matrix<double,nRows,nColumns,Options,_Rows,_Cols> &' from 'const Eigen::Matrix<double,8,3,0,8,3>' (compiling source file C:\projects\caribou\src\Plugin\Forcefield\FictitiousGridHyperelasticForce.cpp)    Plugin  C:\projects\caribou_build\src\Plugin\include\SofaCaribou\Forcefield\HyperelasticForcefield.inl  346 
Error   C2784   'Eigen::Matrix<double,Dimension,Dimension,0,_Rows,_Cols> caribou::mechanics::elasticity::strain::F(const Eigen::Matrix<double,nRows,nColumns,Options,_Rows,_Cols> &,const Eigen::Matrix<double,nRows,nColumns,Options,_Rows,_Cols> &)': could not deduce template argument for 'const Eigen::Matrix<double,nRows,nColumns,Options,_Rows,_Cols> &' from 'const Eigen::Matrix<double,4,3,0,4,3>' (compiling source file C:\projects\caribou\src\Plugin\Forcefield\HyperelasticForcefield.cpp) Plugin  C:\projects\caribou_build\src\Plugin\include\SofaCaribou\Forcefield\HyperelasticForcefield.inl  346 
Error   C2784   'Eigen::Matrix<double,Dimension,Dimension,0,_Rows,_Cols> caribou::mechanics::elasticity::strain::F(const Eigen::Matrix<double,nRows,nColumns,Options,_Rows,_Cols> &,const Eigen::Matrix<double,nRows,nColumns,Options,_Rows,_Cols> &)': could not deduce template argument for 'const Eigen::Matrix<double,nRows,nColumns,Options,_Rows,_Cols> &' from 'const Eigen::Matrix<double,4,2,0,4,2>' (compiling source file C:\projects\caribou\src\Plugin\Forcefield\HyperelasticForcefield.cpp) Plugin  C:\projects\caribou_build\src\Plugin\include\SofaCaribou\Forcefield\HyperelasticForcefield.inl  346 
Error   C2784   'Eigen::Matrix<double,Dimension,Dimension,0,_Rows,_Cols> caribou::mechanics::elasticity::strain::F(const Eigen::Matrix<double,nRows,nColumns,Options,_Rows,_Cols> &,const Eigen::Matrix<double,nRows,nColumns,Options,_Rows,_Cols> &)': could not deduce template argument for 'const Eigen::Matrix<double,nRows,nColumns,Options,_Rows,_Cols> &' from 'const Eigen::Matrix<double,3,2,0,3,2>' (compiling source file C:\projects\caribou\src\Plugin\Forcefield\HyperelasticForcefield.cpp) Plugin  C:\projects\caribou_build\src\Plugin\include\SofaCaribou\Forcefield\HyperelasticForcefield.inl  346 
Error   C2086   'const Eigen::Matrix<__int64,3,1,0,3,1> SofaCaribou::topology::FictitiousGrid<sofa::defaulttype::Vec3Types>::subcell_coordinates[8]': redefinition  Plugin  C:\projects\caribou\src\Plugin\Topology\FictitiousGrid.cpp  41  
Error   C2086   'const Eigen::Matrix<__int64,3,1,0,3,1> SofaCaribou::topology::FictitiousGrid<sofa::defaulttype::StdVectorTypes<sofa::type::Vec<3,double>,sofa::type::Vec<3,double>,double> >::subcell_coordinates[8]': redefinition    Plugin  C:\projects\caribou\src\Plugin\Topology\FictitiousGrid.cpp  32  
Error   C2086   'const Eigen::Matrix<caribou::topology::internal::BaseGrid<2,GridType_>::Int,2,1,0,2,1> SofaCaribou::topology::FictitiousGrid<sofa::defaulttype::Vec2Types>::subcell_coordinates[4]': redefinition  Plugin  C:\projects\caribou\src\Plugin\Topology\FictitiousGrid.cpp  29  
Error   C2086   'const Eigen::Matrix<caribou::topology::internal::BaseGrid<2,GridType_>::Int,2,1,0,2,1> SofaCaribou::topology::FictitiousGrid<sofa::defaulttype::StdVectorTypes<sofa::type::Vec<2,double>,sofa::type::Vec<2,double>,double> >::subcell_coordinates[4]': redefinition    Plugin  C:\projects\caribou\src\Plugin\Topology\FictitiousGrid.cpp  24  
Error   C2672   'caribou::mechanics::elasticity::strain::F': no matching overloaded function found (compiling source file C:\projects\caribou\src\Plugin\Forcefield\HyperelasticForcefield.cpp) Plugin  C:\projects\caribou_build\src\Plugin\include\SofaCaribou\Forcefield\HyperelasticForcefield.inl  346 
Error   C2672   'caribou::mechanics::elasticity::strain::F': no matching overloaded function found (compiling source file C:\projects\caribou\src\Plugin\Forcefield\FictitiousGridHyperelasticForce.cpp)    Plugin  C:\projects\caribou_build\src\Plugin\include\SofaCaribou\Forcefield\HyperelasticForcefield.inl  346 
Error   C2672   'caribou::mechanics::elasticity::strain::F': no matching overloaded function found  Plugin  C:\projects\caribou\src\Plugin\Forcefield\FictitiousGridElasticForce.cpp    338 
Error   C2039   'BackendName': is not a member of 'SofaCaribou::solver::`anonymous-namespace'::solver_traits<SofaCaribou::solver::EigenSolver<Eigen::SparseMatrix<double,0,int>>>' (compiling source file C:\projects\caribou\src\Plugin\Solver\LUSolver.cpp)   Plugin  C:\projects\caribou_build\src\Plugin\include\SofaCaribou\Solver\LUSolver.inl    84  
Error   C2039   'BackendName': is not a member of 'SofaCaribou::solver::`anonymous-namespace'::solver_traits<SofaCaribou::solver::EigenSolver<Eigen::SparseMatrix<double,0,int>>>' (compiling source file C:\projects\caribou\src\Plugin\Solver\LLTSolver.cpp)  Plugin  C:\projects\caribou_build\src\Plugin\include\SofaCaribou\Solver\LLTSolver.inl   77  
Error   C2039   'BackendName': is not a member of 'SofaCaribou::solver::`anonymous-namespace'::solver_traits<SofaCaribou::solver::EigenSolver<Eigen::SparseMatrix<double,0,int>>>' (compiling source file C:\projects\caribou\src\Plugin\Solver\LDLTSolver.cpp) Plugin  C:\projects\caribou_build\src\Plugin\include\SofaCaribou\Solver\LDLTSolver.inl  78