Mex -largeArrayDims in Linux

2 ビュー (過去 30 日間)
elham ramin
elham ramin 2019 年 10 月 11 日
コメント済み: elham ramin 2019 年 10 月 28 日
Hi,
I would like to run my matlab code on Linux.
I would need to reformulate this line:
lapacklib = fullfile(matlabroot, ...
'extern', 'lib', 'win64', 'microsoft', 'libmwlapack.lib');
mex('-v', '-g', '-largeArrayDims-largeArrayDims', 'PCM_speciation1_DAE.c', lapacklib);
I hve tried this formulation: mex -largeArrayDims PCM_speciation1_DAE.c
But I get this error: Error using mex
/var/tmp/pbs.14518.hnode4/mex_5537398213038998_2534/PCM_speciation1_DAE.o: In function `MatDiv':
PCM_speciation1_DAE.c:(.text+0x665b): undefined reference to `dgesv_'
collect2: error: ld returned 1 exit status
Thank you in advance for the help.

採用された回答

James Tursa
James Tursa 2019 年 10 月 11 日
編集済み: James Tursa 2019 年 10 月 11 日
You didn't give it the LAPACK library to link to, so there is no dgesv_ function, hence the error. You need to take this:
lapacklib = fullfile(matlabroot, ...
'extern', 'lib', 'win64', 'microsoft', 'libmwlapack.lib');
and turn it into the location and name for your system (which obviously isn't going to be 'win64'), and feed that into the mex command like it originally was.
  1 件のコメント
elham ramin
elham ramin 2019 年 10 月 28 日
Thank you!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeWrite C Functions Callable from MATLAB (MEX Files) についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by