How to determine MEX API version?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Alain BARTHE
il 17 Mar 2016
Commentato: James Tursa
il 8 Nov 2018
I have written some years ago a C shared library to use with Matlab.
I was using the MX_API_VER preprocessor macro to detect MEX API version,
#include "mex.h"
#include "matrix.h"
#if (! defined MX_API_VER) || (MX_API_VER < 0x07030000)
/*
* Compatibiliy with older version of MATLAB
*/
typedef int mwSize;
typedef int mwIndex;
#endif
Unfortunately, it seems that the MX_API_VER has disappeared from matrix.h in Matlab 2016a.
Is there another way to detect MAX API version ?
Regards.
0 Commenti
Risposta accettata
James Tursa
il 17 Mar 2016
I have a complicated macro to detect API version at compile time that I could post, but if you are only trying to deal with the mwSize and mwIndex stuff you can check for MWSIZE_MAX. E.g.,
#ifndef MWSIZE_MAX
#define mwIndex int
#define mwSignedIndex int
#define mwSize int
#endif
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Write C Functions Callable from MATLAB (MEX Files) in Help Center e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!