Error using mex: undefined reference for user build package
Ältere Kommentare anzeigen
>> mex kalcvf.c
Building with 'gcc'.
Error using mex
/tmp/mex_40203179616654_15298/kalcvf.o: In function `kalcvf':
kalcvf.c:(.text+0x120): undefined reference to `dcopy_'
(...)
the folder includes several files, such as
dlyap.c
kalcvf.c
kalcvf.def
kalcvf.vcproj
kalcvf.vcxproj
kalcvf.filters
kalcvf.user
matlib.c
matlib.h
and in a parent directory
mex.ncb
mex.sdf
mex.sln
What additional steps do I need to take in order to compile the mex function?
4 Kommentare
Jan
am 16 Jul. 2019
dcopy_ belongs the BLAS libraries. Did you include them?
mex kalcvf.c libmwlapack.lib libmwblas.lib
Economist_101
am 16 Jul. 2019
Bearbeitet: Economist_101
am 16 Jul. 2019
According to the documentation https://www.mathworks.com/help/matlab/matlab_external/calling-lapack-and-blas-functions-from-mex-files.html
mex -v -R2017b yourFcn.c -lmwblas
[MOVED to the section for answers]
Economist_101
am 17 Jul. 2019
Akzeptierte Antwort
Weitere Antworten (1)
James Tursa
am 16 Jul. 2019
0 Stimmen
Try looking in the MATLAB/R2019a/extern/lib folder for versions of these files appropriate for your system. They might have slightly different names than above, but should have lapack and blas as part of the names.
Kategorien
Mehr zu MATLAB Compiler finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!