Ошибка получения неопределенных ссылок при попытке собрать проект с помощью cmake - PullRequest
0 голосов
/ 04 августа 2020

Я получаю следующие ошибки, когда пытаюсь построить с помощью cmake

/usr/bin/ld: CMakeFiles/OpenMEEGMathsTest-vector.dir/vector.cpp.o: in function `OpenMEEG::Matrix::frobenius_norm() const':
vector.cpp:(.text._ZNK8OpenMEEG6Matrix14frobenius_normEv[_ZNK8OpenMEEG6Matrix14frobenius_normEv]+0xe4): undefined reference to `LAPACKE_dlange'
/usr/bin/ld: ../libOpenMEEGMaths.so.1.1.0: undefined reference to `LAPACKE_dgesdd'
/usr/bin/ld: ../libOpenMEEGMaths.so.1.1.0: undefined reference to `LAPACKE_dsptrf'
/usr/bin/ld: ../libOpenMEEGMaths.so.1.1.0: undefined reference to `LAPACKE_dsptrs'
collect2: error: ld returned 1 exit status
make[2]: *** [OpenMEEGMaths/tests/CMakeFiles/OpenMEEGMathsTest-vector.dir/build.make:93: OpenMEEGMaths/tests/OpenMEEGMathsTest-vector] Error 1
make[1]: *** [CMakeFiles/Makefile2:340: OpenMEEGMaths/tests/CMakeFiles/OpenMEEGMathsTest-vector.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

Я получил это при запуске:

cmake -DCMAKE_BUILD_TYPE=Release -DUSE_PROGRESSBAR=ON -DBLA_VENDOR=OpenBLAS ..

Вывод CMake:

-- Check whether the compiler has C++17 extension of shared_ptr for arrays
-- Check whether the compiler has C++17 extension of shared_ptr for arrays - found
-- Check whether the compiler has isnormal function in namespace std
-- Check whether the compiler has isnormal function in namespace std - found
-- Check whether the compiler has OpenMP support for range for loops
-- Check whether the compiler has OpenMP support for range for loops - found
-- Check whether the compiler has OpenMP support for iterator loops
-- Check whether the compiler has OpenMP support for iterator loops - not found
-- Check whether the compiler has OpenMP support for unsigned loops
-- Check whether the compiler has OpenMP support for unsigned loops - found
-- Found OpenBLAS libraries: /usr/lib/x86_64-linux-gnu/libopenblas.so;/usr/lib/x86_64-linux-gnu/liblapacke.so
-- Found OpenBLAS include: /usr/include/x86_64-linux-gnu
-- HDF5: Using hdf5 compiler wrapper to determine C configuration
-- matio.h /usr/include
-- matio_library /usr/lib/x86_64-linux-gnu/libmatio.so
-- Configuring done
-- Generating done
-- Build files have been written to: /home/mah/openmeeg/build
...