What libraries are generated c/c++ code needed?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
I'm using coder to generated c/c++ code on windows and compile it to a shared library on linux. How can I now what libraries are needed to link? Sometimes math lib is required, while sometimes not. Are there some methods to automaticly compile generated regardless what libraries are needed?
0 Commenti
Risposte (1)
Kanishk
il 11 Lug 2025
Hello,
I understand you are generating C/C++ code on windows and want to compile the generated code on a linux machine.
In the Model's configuration parameters, set the 'Device Vendor' to be either 'AMD' or 'Intel' and 'Device Type' to be 'x86-64 (Linux 64)' and enable the 'Package code and artifacts' and 'Generate Code only' in the Code generation options. This will generate a zip folder with all the required files to build the executable which can be used in the linux development environment.
You can follow this article from MathWorks support to learn more.
Hope this helps!
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!