PDA

View Full Version : C mex in MATLAB and the commenting



Masih
21st August 2007, 17:57
Hi,

I am having trouble with compiling C mex in MATLAB under Linux environment. As it is apparent the C compiler doesn't accept // as comment signs and trys to compile it and reflects huge list of errors.
Does someone know how can I change the setting options (mexopt.sh) in MATLAB under Linux to let me comment the lines of C with '//' instead of '/* */' ?

Thx:eek:

jacek
22nd August 2007, 22:06
I don't know how can you convince Matlab to use older C standard, but C++ style comments appeared in C99, so either you need a recent C compiler or simply try to compile your code with C++ compiler.