Can C files be used with a Matlab Standalone Application without a C Compiler?

1 回表示 (過去 30 日間)
Matthew Tourtelot
Matthew Tourtelot 2016 年 8 月 15 日
回答済み: Walter Roberson 2016 年 8 月 17 日
I'm working on adding a CRC/MD5 routine to my standalone application. I found a C file to run with my application. I was wondering if I packaged my application up, could the included C file and functions still be used on other machines without a C Compiler?

回答 (2 件)

Swathik Kurella Janardhan
Swathik Kurella Janardhan 2016 年 8 月 17 日
編集済み: Swathik Kurella Janardhan 2016 年 8 月 17 日
To use the functions in your C file in MATLAB, you need to create a MEX file . Then you can build a standalone application of your MATLAB code that calls functions from MEX file with MATLAB Compiler toolbox .
You need to have one of the supported compilers to create MEX file from C file. You do not need a C Compiler on machine where you will be using your standalone application.

Walter Roberson
Walter Roberson 2016 年 8 月 17 日
If you compile the C routines into a library then you can use loadlibrary() instead of creating a MEX routine.
In order to use loadlibrary() within a deployed application, you will need to generate a prototype file; see loadlibrary() for information about prototype files.

カテゴリ

Help Center および File ExchangeMATLAB Compiler についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by