Skip to content

Fixed a debug compilation error

wenqing requested to merge wenqing/ogs:fixing into master

Under Debug compilation, there is a compilation error when gcc compiler is used:

[ogs6/sources]/ParameterLib/CoordinateSystem.cpp:97: error: undefined reference to 'Eigen::MatrixBase<Eigen::Matrix<double, 2, 2, 0, 2, 2> >::determinant() const'
[ogs6/sources]/ParameterLib/CoordinateSystem.cpp:99: error: undefined reference to 'Eigen::MatrixBase<Eigen::Matrix<double, 2, 2, 0, 2, 2> >::determinant() const'
[ogs6/sources]/ParameterLib/CoordinateSystem.cpp:99: error: undefined reference to 'Eigen::MatrixBase<Eigen::Matrix<double, 2, 2, 0, 2, 2> >::determinant() const'
collect2: error: ld returned 1 exit status
make[2]: *** [Tests/CMakeFiles/testrunner.dir/build.make:967: bin/testrunner] Error 1
make[1]: *** [CMakeFiles/Makefile2:2764: Tests/CMakeFiles/testrunner.dir/all] Error 2

It is due to <Eigen/Core> being used in target_precompile_headers for CMake. <Eigen/Core> only includes Eigen::MatrixBase, which dose have member determinant(). missing Eigen/Dense include in the corresponding translation unit. This MR fixes this issue.

Edited by Dmitry Yu. Naumov

Merge request reports