Borrar filtros
Borrar filtros

How to convert/run C++ (cpp and hpp files) from a GitHub folder on MATLAB?

7 visualizaciones (últimos 30 días)
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!

Respuestas (1)

Amanjeet Pani
Amanjeet Pani el 13 de Jul. de 2022
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
Additionally you can go through this link to know more.

Categorías

Más información sobre Call C++ from MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by