kyamagu / mexopencv

Collection and a development kit of matlab mex functions for OpenCV library
http://kyamagu.github.io/mexopencv
Other
659 stars 318 forks source link

mexopencv not compiling #459

Open swetha-sree opened 4 years ago

swetha-sree commented 4 years ago

Matlab R2019b Visual Studio Professional 2019 opencv-3.4.1 opencv contrib-3.4.1 Window-10 Cmake-3.16.5

Command mexopencv.make('opencv_path','D:\opencv-3.4.1\build', 'opencv_contrib',true) Here is the stack trace for the same:

Error using mexopencv.make>compiler_str (line 463) Unsupported C++ compiler: Microsoft Visual C++ 2019

Error in mexopencv.make>pkg_config (line 331) L_path = fullfile(opts.opencv_path, arch_str(), compiler_str(), 'lib');

Error in mexopencv.make>mex_options (line 265) [cv_cflags, cv_libs] = pkg_config(opts);

Error in mexopencv.make (line 82) mex_flags = mex_options(opts);

ShrivastavaKartik commented 4 years ago

Were you able to solve it, I'm also getting Unsupported C++ compiler: Microsoft Visual C++ 2019

ShrivastavaKartik commented 4 years ago

Done one edit to compile it with Visual Studio 2019, in case someone find it useful. Edited the make.m file like following:

            if ~isempty(strfind(cc.Name, 'Visual'))  % Visual Studio
                switch cc.Version
                    case '16.0'           % new code
                        s = 'vc16';        % new code