フィルターのクリア

MatLab and C++ compiler together

1 回表示 (過去 30 日間)
Philosophaie
Philosophaie 2014 年 1 月 7 日
回答済み: Walter Roberson 2014 年 1 月 7 日
I have just downloaded Visual C++ 2010. Could someone give me an overview on what I have to do to compile a MatLab ".m" file using the MatLab and C++ compiler together.
  1 件のコメント
Patrik Ek
Patrik Ek 2014 年 1 月 7 日
編集済み: Patrik Ek 2014 年 1 月 7 日
Hi, may I ask for a clarification here? So to say, what do you want to do? I seems that you have a .cpp file that you want to run in MATLAB in some way. Am I right?

サインインしてコメントする。

回答 (1 件)

Walter Roberson
Walter Roberson 2014 年 1 月 7 日
The MATLAB Compiler product can be used to generate executables, without translating the .m into C or C++. It does happen to require a C or C++ compiler to put some parts of the executable together properly, but the .m never becomes C or C++ in this process.
The MATLAB Coder product can be used to generate C or C++ code from .m files; you would then use a C or C++ compiler to generate object code for the desired target.
You can also call C or C++ routines from MATLAB, without using any additional toolboxes, by using loadlib() and calllib()
You can make your own "built in commands" for use in .m files, by building writing a MEX interface to your C or C++ code, and then compiling the MEX interface together with the C or C++ code; this does not require any additional toolboxes.

カテゴリ

Help Center および File ExchangeC Shared Library Integration についてさらに検索

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by