What libraries are generated c/c++ code needed?
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Kanishk
2025 年 7 月 11 日
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!
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!