フィルターのクリア

Using the MX Matrix Library in General C Code

1 回表示 (過去 30 日間)
Royi Avital
Royi Avital 2012 年 7 月 5 日
コメント済み: Royi Avital 2020 年 4 月 22 日
Hello. I'm trying to create a MEX filte. In order to debug the code I'm trying to compile it in Visual Studio.
I'm replacing the header with 'void main'. For some reason something is going wrong with using 'mex.h'.
How could I use the MX library in a general C / C++ code?
Thank You.
  5 件のコメント
Royi Avital
Royi Avital 2012 年 7 月 7 日
Maybe I need to clarify it. I want to write a regular C code (main function, compiled into EXE). I want to use the MX library just as I can use the stdio library.
Could that be done? How can I do that?
It seems that adding the 'h' file (mex.h) won't do.
Royi Avital
Royi Avital 2020 年 4 月 22 日
@Kaustubha Govind, Let me ask you that, is there a way to create a standalone compiled file (From a C file) which uses MATLAB C Matrix API?

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

採用された回答

Royi Avital
Royi Avital 2014 年 9 月 13 日
It seems Mathworks did something to disable the option to create a C code which uses their library outside the MEX scope.
I Don't get how they do it, but that's the result.

その他の回答 (1 件)

Walter Roberson
Walter Roberson 2012 年 7 月 7 日
"void main" need not be accepted as the signature of the main routine of a C program. main() is defined to return an integer in C, so telling C that your "main" routine has a void return is going to generate something does not have the proper datatypes for the required main program.
  1 件のコメント
Royi Avital
Royi Avital 2012 年 7 月 7 日
So I will write an 'int main'. Still, How can I use the MX library?

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

カテゴリ

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