when I used "FIND_PACKAGE(Matlab REQUIRED)" in cmakelist, error produced.

조회 수: 9 (최근 30일)
Yanpeng Gong
Yanpeng Gong 2021년 5월 13일
댓글: xingxingcui 2022년 8월 9일
my system is Ubuntu18 and matlab2020b. Then, I used "FIND_PACKAGE(Matlab REQUIRED)" in CMakeLists. However, when I used command "cmake ..", an error produced as follows:
CMake Error at /usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find Matlab (missing: MATLAB_MEX)
Call Stack (most recent call first):
/usr/share/cmake-3.10/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
cmake/Modules/FindMatlab.cmake:26 (find_package_handle_standard_args)
CMakeLists.txt:8 (FIND_PACKAGE)
How can I fix the error?
  댓글 수: 2
Hsuan-Chang Shih
Hsuan-Chang Shih 2021년 8월 30일
Hi,
Do you solve this ? Cause I have the same problem in Win10 + Clion 2019.3 + Matlab R2021a
It seem like the matlab library are not included, the findpackage(Matlab) can't get it ?
xingxingcui
xingxingcui 2022년 8월 9일
you can try set matlab_root_dir is your install path by manual

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by