How to convert/run C++ (cpp and hpp files) from a GitHub folder on MATLAB?
7 次查看(过去 30 天)
显示 更早的评论
Hello,
I was hoping someone would be able to provide me with a clear answer on how to run C++ in MATLAB.
I have run into a folder on GitHub that has peaked my interest, https://github.com/prometey1982/VolvoTools. I do not have access to a program that can run C++, and given I am a University student I do have access to MATLAB.
Is there a possible way to run these files through MATLAB and eventually export it as a .exe file?
I have downloaded the C++ add-on and watched the MATLAB YouTube video, but I am lost as what to do with static libraries and so forth.
I appreciate any and all help!
0 个评论
回答(1 个)
Amanjeet Pani
2022-7-13
From within your MATLAB code, you can directly call external C/C++ code, also called custom code or legacy code. To call C/C++ functions, use coder.ceval. The code generator integrates your C/C++ code into the C/C++ code generated from MATLAB. Integrate code when there are external libraries, optimized code, or object files developed in C/C++ that you want to use with your generated code. this seems to be the way out for your problem
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Call C++ from MATLAB 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!