×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Matlab MEX Compiler Problem

Matlab MEX Compiler Problem

Matlab MEX Compiler Problem

(OP)
I'm developing a MatLab toolbox about stereopsis, In order to compute the disparity map given two stereo images I need to use the Birchfield-Tomasi algorithm included in the OpenCV libraries. I have created a folder with all header files needed to compile the cvdpstereo.cpp file, but when I try to run the MEX compiler an error occurs :

>> mex cvdpstereo.cpp
Error cvdpstereo.cpp: .\cxtypes.h: 300  compiler error in _kids--Bad rule number 0
 
  C:\PROGRA~1\MATLAB\R2007\BIN\MEX.PL: Error: Compile of 'cvdpstereo.cpp' failed.
 
??? Error using ==> mex at 206
Unable to complete successfully.


Can anyone help me please? :(

RE: Matlab MEX Compiler Problem

Given the "\" directory separator this is Windoze.  That means MEX may use one of many compilers (Borland, Watcom, Intel, MSVC++, lcc, ...).  If it's MSVC++ then C++ source code can be used.  If lcc, only C can be used.  Unfortunately I can't comment on any of the others.

(I don't see the relevance of "The Matlab compiler" though in the context of building MEX files.)

RE: Matlab MEX Compiler Problem

(OP)
Sorry, but I'm newbie about MEX-File so I tried to compile the cvdpstereocorrisp.ccp directly :S  Reading the documentation about mex files I have solved the problem writing a C file containing the  mexFuction(...) instead of main(...),calling  cvdpstereocorrisp function in MEX-File and compiling  all via Visual C++ IDE (not via Matlab). Now all works perfectly,  I have my MEX file that computes the disparity map. :D  Thanks for yours suggests !!!!

RE: Matlab MEX Compiler Problem

Matlab has a built-in compiler, lcc, which is the default.  You have to specifically change the settings to use a different compiler.

TTFN

FAQ731-376: Eng-Tips.com Forum Policies

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources