Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

mexopencv not compiling #459

Open
swetha-sree opened this issue Mar 18, 2020 · 2 comments
Open

mexopencv not compiling #459

swetha-sree opened this issue Mar 18, 2020 · 2 comments

Comments

@swetha-sree
Copy link

swetha-sree commented Mar 18, 2020

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
Copy link

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

@ShrivastavaKartik
Copy link

ShrivastavaKartik commented Aug 8, 2020

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants