Using Boost Library in MEX Function

조회 수: 4 (최근 30일)
NaiveMeasurement
NaiveMeasurement 2019년 1월 1일
댓글: Walter Roberson 2019년 1월 2일
I'm trying to use the Boost Libraries to write a multi-threaded MEX function.
Now I've already added the Boost Library files to the MATLAB PATH and the Linker Path like this:
path(oldpath, 'C:\Folder\OtherFolder\MATLAB\Files\boost\boost_1_67_0')
setenv('PATH', [getenv('PATH') ';C:\Folder\OtherFolder\MATLAB\Files\boost\boost_1_67_0\stage\lib']);
So I'm not sure what I'm missing.
  댓글 수: 1
Walter Roberson
Walter Roberson 2019년 1월 2일
MATLAB path and PATH environment variable are both ignored when searching for libraries. You need the -L option to tell it where to look for the libraries.

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

답변 (1개)

Walter Roberson
Walter Roberson 2019년 1월 1일
mex simpleBoostExample.cpp -IC:\Folder\OtherFolder\MATLAB\Files\boost\boost_1_67_0 -LC:\Folder\OtherFolder\MATLAB\Files\boost\boost_1_67_0 -lboost -lboost_thread
I might not have exactly the right libraries for your purpose.

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by