Why do I get these error messages when using "MexMe"?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I'd like to use MexMe to create mex-files automatically. But each time I run TestMexMe.m, it gives me a host of error messages (20-30) concerning the file mydouble.c.
These are a few of the error messages I get using the Lcc compiler:
>> TestMexMe
Error mydouble.c: 33 illegal statement termination
Error mydouble.c: 33 skipping `const'
Error mydouble.c: 33 illegal use of type name `mxArray'
Error mydouble.c: 33 undeclared identifier `x_ptr'
Error mydouble.c: 33 operands of * have illegal types `incomplete struct mxArray_tag defined at C:\PROGRA~1\MATLAB\R2011B\extern\include\matrix.h 299' and `int'
...etc...
C:\PROGRA~1\MATLAB\R2011B\BIN\MEX.PL: Error: Compile of 'mydouble.c' failed.
Error using mex (line 206)
Unable to complete successfully.
Error in TestMexMe (line 25)
mex mydouble.c
Using MS Visual C++ compiler I get similar errors (all of them have to do with mmydouble.c).
Any idea what might be causing these issues?
ps.: I'm using the R 2011 b version on WinXP.
2 Kommentare
Antworten (3)
Jan
am 30 Okt. 2012
Bearbeitet: Jan
am 30 Okt. 2012
These are obvioulsy errors in the mydouble.c program and not caused by MexMe. When you post teh source of this function, we could find the problem. What do you find in line 33?
14 Kommentare
Jan
am 12 Nov. 2012
See my comments at FEX: MexMe. The automatically created code has C++ style, but the Windows compiler assumes C according to the file extension. Either rename the file to .cpp (e.g. by modifying MexMe.m), or resort the lines such that the declarations of variables are move before the first line of calculations.
I do not think that MexMe can create Mex-files "in no time" as advertised, but it is much faster than even a very experienced C-Mex-programmer. It must be expected, that automatically generated code demands for a manual fine tuning.
Siehe auch
Kategorien
Mehr zu MATLAB Compiler finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!