Using the MX Matrix Library in General C Code
显示 更早的评论
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 个评论
Kaustubha Govind
2012-7-5
It's not clear what you mean by "something is going wrong". Please specify error messages if any, or the observed behavior.
Royi Avital
2012-7-6
TAB
2012-7-6
In which format you want to compile your code ? mex or exe ?
Royi Avital
2012-7-7
Royi Avital
2020-4-22
采纳的回答
更多回答(1 个)
Walter Roberson
2012-7-7
0 个投票
"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.
类别
在 帮助中心 和 File Exchange 中查找有关 Write C Functions Callable from MATLAB (MEX Files) 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!