The extrinsic function 'dir' is not available for standalone code generation. It must be eliminated for stand-alone code to be generated. It could not be eliminated because its outputs appear to influence the calling function. Fix this error by not u

43 vues (au cours des 30 derniers jours)
I am using MATLAB Coder. When I generate my code MATLAB to c code, I get this problem.
The extrinsic function 'dir' is not available for standalone code generation. It must be eliminated for stand-alone code to be generated. It could not be eliminated because its outputs appear to influence the calling function. Fix this error by not using 'dir' or by ensuring that its outputs are unused.
Is there other function that I can use to lists the files in a folder?

Réponses (1)

Darshan Ramakant Bhat
Darshan Ramakant Bhat le 17 Mar 2021
The function 'dir' is not supported for codegeneration. Below is the list of functions supported for codegen :
If you are using coder.extrinsic() on this function, it will not work for standalone codegeneration. The coder.extrinsci() needs MATLAB execution engine to evalute it. You can read the full description with examples in the below doc :
  2 commentaires
Jiahao He
Jiahao He le 18 Mar 2021
I konw it. So, Is the a alternative to realize the function of 'dir' function for codegeneration?
Mohammad Larijani
Mohammad Larijani le 24 Mai 2023
In this list, there is quadprog. But, it cann't be compiled!

Connectez-vous pour commenter.

Catégories

En savoir plus sur MATLAB Coder dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by