Import Function is not supported
9 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hi,
I am converting my MATLAB code into C code using MATLAB Coder. However, this error popped out while I'm trying to convert it.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/292165/image.png)
It said that the import statements below are not supported.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/292166/image.png)
How am I supposed to modify the code? I need it for my project to run smoothly.
Thank you.
0 Kommentare
Antworten (1)
David Fink
am 11 Mai 2020
import is used to bring names into scope.
Instead of:
import x.y.*
functionInXY();
use
x.y.functionInXY();
Please contact MathWorks Technical Support to formally express your interest in supporting import in a future release.
6 Kommentare
David Fink
am 12 Mai 2020
If generating a MEX file, MATLAB Coder can call into MATLAB (which can call Java) via coder.extrinsic.
If generating standalone C code, MATLAB Coder cannot call into MATLAB or Java.
Siehe auch
Kategorien
Mehr zu MATLAB Coder finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!