Using the MX Matrix Library in General C Code
Afficher commentaires plus anciens
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 commentaires
Kaustubha Govind
le 5 Juil 2012
It's not clear what you mean by "something is going wrong". Please specify error messages if any, or the observed behavior.
Royi Avital
le 6 Juil 2012
TAB
le 6 Juil 2012
In which format you want to compile your code ? mex or exe ?
Royi Avital
le 7 Juil 2012
Royi Avital
le 22 Avr 2020
Réponse acceptée
Plus de réponses (1)
Walter Roberson
le 7 Juil 2012
0 votes
"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 commentaire
Royi Avital
le 7 Juil 2012
Catégories
En savoir plus sur Write C Functions Callable from MATLAB (MEX Files) dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!