numerous "undeclared identifier" errors using MEX

2 views (last 30 days)
Hello-
I have downloaded smoothpatch_curvature_double.c (from Matlab exchange) and am trying to use MEX for the first time. I am on Windows 7, with a 64bit operating system, but am using Matlab 7.1.0.246 (R14) which is of course pretty old. Perhaps it can't access the full 64-bit system (?)
I entered "mex setup" first and chose LCC compiler
then as suggested in the comments, I used the command:
mex smoothpatch_curvature_double.c -v
A huge number of errors like those below occurred. Can someone please help me? Thanks very much in advance! Greg
Error smoothpatch_curvature_double.c: 25 undeclared identifier `mwSize' Error smoothpatch_curvature_double.c: 25 undeclared identifier `PneigDims' Warning smoothpatch_curvature_double.c: 25 Statement has no effect Error smoothpatch_curvature_double.c: 26 illegal statement termination Error smoothpatch_curvature_double.c: 26 skipping `int'
  2 Comments
Walter Roberson
Walter Roberson on 14 Oct 2012
MATLAB R14 is only a 32 bit executable (but those will generally execute on 64 bit Windows)
MATLAB R14 is not known to work with Windows 7.
Gregory Ojakangas
Gregory Ojakangas on 14 Oct 2012
Thanks, Walter. As I recall, when my information services people installed my old Matlab on new Windows 7 machine, they found that they had to choose "XP mode" for the display options, and then it worked fine. Still, it would be good to upgrade and make use of the 64-bits. Greg

Sign in to comment.

Accepted Answer

James Tursa
James Tursa on 14 Oct 2012
Try putting this at the top of the smoothpatch_curvature_double.c file:
#ifndef MWSIZE_MAX
#define mwIndex int
#define mwSignedIndex int
#define mwSize int
#endif
  1 Comment
Gregory Ojakangas
Gregory Ojakangas on 14 Oct 2012
James- This did the trick, and I now have a program that is working beautifully. Thanks again!

Sign in to comment.

More Answers (0)

Categories

Find more on Programming in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!