Clear Filters
Clear Filters

Matlab 2012 b with OpenCV 2.4.10

1 view (last 30 days)
Abdelkhalek Bakkari
Abdelkhalek Bakkari on 27 Sep 2015
I have a Matlab 2012b and I installed OpenCV 2.4.10. When I execute the command : mex dicom.h
An error appears : dicom.h : fatal error LNK1107: invalid or corrupt file: cannot read at 0x7A41
C:\PROGRA~1\MATLAB\R2012A\BIN\MEX.PL: Error: Link of 'dicom.mexw64' failed.
And when I execute the command : mex dicomread6_mex.cpp
An error appears : dicomread6_mex.cpp d:\matlab code\mfcm3d\dicom.h(514) : warning C4267: 'return' : conversion from 'size_t' to 'int', possible loss of data dicomread6_mex.cpp(56) : warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data dicomread6_mex.cpp(93) : error C2065: 'mxArray' : undeclared identifier dicomread6_mex.cpp(93) : error C2065: 'rhs' : undeclared identifier dicomread6_mex.cpp(97) : error C2065: 'rhs' : undeclared identifier dicomread6_mex.cpp(97) : error C2065: 'mxUINT16_CLASS' : undeclared identifier dicomread6_mex.cpp(97) : error C2065: 'mxREAL' : undeclared identifier dicomread6_mex.cpp(97) : error C3861: 'mxCreateNumericMatrix': identifier not found dicomread6_mex.cpp(98) : error C2065: 'rhs' : undeclared identifier dicomread6_mex.cpp(98) : error C3861: 'mxGetData': identifier not found dicomread6_mex.cpp(102) : error C2065: 'rhs' : undeclared identifier dicomread6_mex.cpp(102) : error C3861: 'mexCallMATLAB': identifier not found dicomread6_mex.cpp(103) : error C2065: 'rhs' : undeclared identifier dicomread6_mex.cpp(103) : error C3861: 'mxDestroyArray': identifier not found dicomread6_mex.cpp(160) : error C2065: 'mxArray' : undeclared identifier dicomread6_mex.cpp(160) : error C2065: 'rhs' : undeclared identifier dicomread6_mex.cpp(165) : error C2065: 'rhs' : undeclared identifier dicomread6_mex.cpp(165) : error C2065: 'mxUINT16_CLASS' : undeclared identifier dicomread6_mex.cpp(165) : error C2065: 'mxREAL' : undeclared identifier dicomread6_mex.cpp(165) : error C3861: 'mxCreateNumericArray': identifier not found dicomread6_mex.cpp(166) : error C2065: 'rhs' : undeclared identifier dicomread6_mex.cpp(167) : error C3861: 'mexErrMsgTxt': identifier not found dicomread6_mex.cpp(168) : error C2065: 'rhs' : undeclared identifier dicomread6_mex.cpp(168) : error C3861: 'mxGetPr': identifier not found dicomread6_mex.cpp(179) : error C2065: 'rhs' : undeclared identifier dicomread6_mex.cpp(179) : error C2065: 'mxREAL' : undeclared identifier dicomread6_mex.cpp(179) : error C3861: 'CreateDoubleMatrix': identifier not found dicomread6_mex.cpp(180) : error C2065: 'rhs' : undeclared identifier dicomread6_mex.cpp(180) : error C3861: 'mxGetPr': identifier not found dicomread6_mex.cpp(183) : error C2065: 'rhs' : undeclared identifier dicomread6_mex.cpp(183) : error C3861: 'CallMATLAB': identifier not found dicomread6_mex.cpp(184) : error C2065: 'rhs' : undeclared identifier dicomread6_mex.cpp(184) : error C3861: 'mxDestroyArray': identifier not found dicomread6_mex.cpp(375) : error C3861: 'mexPrintf': identifier not found dicomread6_mex.cpp(408) : error C3861: 'mexPrintf': identifier not found dicomread6_mex.cpp(414) : error C3861: 'mexPrintf': identifier not found dicomread6_mex.cpp(437) : error C3861: 'mexPrintf': identifier not found dicomread6_mex.cpp(482) : error C3861: 'mexPrintf': identifier not found dicomread6_mex.cpp(492) : error C3861: 'mexPrintf': identifier not found dicomread6_mex.cpp(542) : error C3861: 'mexPrintf': identifier not found dicomread6_mex.cpp(604) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data dicomread6_mex.cpp(619) : error C3861: 'mexPrintf': identifier not found dicomread6_mex.cpp(621) : error C3861: 'mexPrintf': identifier not found dicomread6_mex.cpp(632) : error C2065: 'mxArray' : undeclared identifier dicomread6_mex.cpp(632) : error C2065: 'rhs' : undeclared identifier dicomread6_mex.cpp(633) : error C2065: 'rhs' : undeclared identifier dicomread6_mex.cpp(633) : error C2065: 'mxUINT8_CLASS' : undeclared identifier dicomread6_mex.cpp(633) : error C2065: 'mxREAL' : undeclared identifier dicomread6_mex.cpp(633) : error C3861: 'mxCreateNumericMatrix': identifier not found dicomread6_mex.cpp(634) : error C2065: 'rhs' : undeclared identifier dicomread6_mex.cpp(634) : error C3861: 'mxGetPr': identifier not found dicomread6_mex.cpp(636) : error C2065: 'rhs' : undeclared identifier dicomread6_mex.cpp(636) : error C3861: 'mexCallMATLAB': identifier not found dicomread6_mex.cpp(637) : error C2065: 'rhs' : undeclared identifier dicomread6_mex.cpp(637) : error C3861: 'mxDestroyArray': identifier not found dicomread6_mex.cpp(645) : error C3861: 'mexPrintf': identifier not found dicomread6_mex.cpp(648) : error C3861: 'mexPrintf': identifier not found dicomread6_mex.cpp(658) : error C3861: 'mexPrintf': identifier not found dicomread6_mex.cpp(673) : error C2061: syntax error : identifier 'mxArray' dicomread6_mex.cpp(676) : error C2065: 'mxClassID' : undeclared identifier dicomread6_mex.cpp(676) : error C2146: syntax error : missing ';' before identifier 'c1' dicomread6_mex.cpp(676) : error C2065: 'c1' : undeclared identifier dicomread6_mex.cpp(676) : error C2065: 'c2' : undeclared identifier dicomread6_mex.cpp(684) : error C2065: 'nrhs' : undeclared identifier dicomread6_mex.cpp(686) : error C3861: 'mexErrMsgTxt': identifier not found dicomread6_mex.cpp(691) : error C3861: 'mexErrMsgTxt': identifier not found dicomread6_mex.cpp(694) : error C2065: 'c1' : undeclared identifier dicomread6_mex.cpp(694) : error C2065: 'prhs' : undeclared identifier dicomread6_mex.cpp(694) : error C3861: 'mxGetClassID': identifier not found dicomread6_mex.cpp(694) : error C2065: 'c2' : undeclared identifier dicomread6_mex.cpp(694) : error C2065: 'prhs' : undeclared identifier dicomread6_mex.cpp(694) : error C3861: 'mxGetClassID': identifier not found dicomread6_mex.cpp(695) : error C2065: 'c1' : undeclared identifier dicomread6_mex.cpp(695) : error C2065: 'mxCHAR_CLASS' : undeclared identifier dicomread6_mex.cpp(695) : error C2065: 'c2' : undeclared identifier dicomread6_mex.cpp(695) : error C2065: 'mxCHAR_CLASS' : undeclared identifier dicomread6_mex.cpp(697) : error C3861: 'mexErrMsgTxt': identifier not found dicomread6_mex.cpp(700) : error C2065: 'prhs' : undeclared identifier dicomread6_mex.cpp(700) : error C2065: 'prhs' : undeclared identifier dicomread6_mex.cpp(700) : error C3861: 'mxGetM': identifier not found dicomread6_mex.cpp(700) : error C3861: 'mxGetN': identifier not found dicomread6_mex.cpp(702) : error C2065: 'prhs' : undeclared identifier dicomread6_mex.cpp(702) : error C3861: 'mxGetString': identifier not found dicomread6_mex.cpp(704) : error C2065: 'prhs' : undeclared identifier dicomread6_mex.cpp(704) : error C2065: 'prhs' : undeclared identifier dicomread6_mex.cpp(704) : error C3861: 'mxGetM': identifier not found dicomread6_mex.cpp(704) : error C3861: 'mxGetN': identifier not found dicomread6_mex.cpp(706) : error C2065: 'prhs' : undeclared identifier dicomread6_mex.cpp(706) : error C3861: 'mxGetString': identifier not found dicomread6_mex.cpp(754) : error C2065: 'plhs' : undeclared identifier dicomread6_mex.cpp(754) : error C2065: 'mxINT16_CLASS' : undeclared identifier dicomread6_mex.cpp(754) : error C2065: 'mxREAL' : undeclared identifier dicomread6_mex.cpp(754) : error C3861: 'mxCreateNumericArray': identifier not found dicomread6_mex.cpp(755) : error C2065: 'plhs' : undeclared identifier dicomread6_mex.cpp(755) : error C3861: 'mxGetData': identifier not found dicomread6_mex.cpp(762) : error C2065: 'plhs' : undeclared identifier dicomread6_mex.cpp(762) : error C2065: 'mxUINT8_CLASS' : undeclared identifier dicomread6_mex.cpp(762) : error C2065: 'mxREAL' : undeclared identifier dicomread6_mex.cpp(762) : error C3861: 'mxCreateNumericArray': identifier not found dicomread6_mex.cpp(763) : error C2065: 'plhs' : undeclared identifier dicomread6_mex.cpp(763) : error C3861: 'mxGetData': identifier not found dicomread6_mex.cpp(767) : error C2065: 'plhs' : undeclared identifier dicomread6_mex.cpp(767) : error C3861: 'mxCreateStructMatrix': identifier not found dicomread6_mex.cpp(769) : error C2065: 'plhs' : undeclared identifier dicomread6_mex.cpp(769) : fatal error C1003: error count exceeds 100; stopping compilation
C:\PROGRA~1\MATLAB\R2012A\BIN\MEX.PL: Error: Compile of 'dicomread6_mex.cpp' failed.
  2 Comments
Image Analyst
Image Analyst on 27 Sep 2015
Does your .cpp file compile without using MATLAB, like using Microsoft Visual Studio or some other compiler?
Abdelkhalek Bakkari
Abdelkhalek Bakkari on 27 Sep 2015
Yes it compiled using Visual Studio

Sign in to comment.

Answers (0)

Categories

Find more on Write C Functions Callable from MATLAB (MEX Files) in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!