mlx tutorial: interfacing with c++
Ältere Kommentare anzeigen
I followed the 4-step tutorial (matlab 2019b):
A couple of parameters (ReturnCArrays, OverwriteExistingDefinitionFiles) weren't recognizable in clibgen.generateLibraryDefinition(), so I ran it without them.
summary(definematrixlib) and build(definematrixlib) ran fine. But step 4 didn't work:
Unable to resolve the name clib.matrixlib.Mat
and the doc and help matrixlib showed nothing.
---
The school example doesn't work either:
After adding this switch to build the library
I click the link to addpath, but 'help clib.school' returns
clib.school not found.
2 Kommentare
Zohar
am 26 Jan. 2022
Aniket
am 28 Dez. 2022
I recently followed the Matrix example on Matlab 2019b and it worked fine. The following step is necessary-
Put the compiled library file in the folder with the MATLAB® interface file. Uncomment and execute one of these statements based on your selected compiler.
%copyfile(fullfile(productPath,"win64","mingw64","*.dll"),".","f")
%copyfile(fullfile(productPath,"win64","microsoft","*.dll"),".","f")
Call addpath on the folder containing the interface file.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Call C++ from MATLAB 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!