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!