You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.
My OS environment is win8 Pro x64 + matlab2013a, I have try those
mex -setup with VS2012 or VS2010 , and '/D_SECURE_SCL=0' or '/D_SECURE_SCL=1' in make.m , but helpless. My VS2012 could successfully run opencv2.4.8
if isVS && (str2double(c.Version) < 10 || opts.debug)
comp_flags{end+1} = '/D_SECURE_SCL=1';
fprintf('[if] D_SECURE_SCL %s\n','/D_SECURE_SCL=1');
%VS2010 and newer: In debug mode, the default value for _SECURE_SCL is 1. In release mode, the default value for _SECURE_SCL is 0.
else
%comp_flags{end+1} = '/D_SECURE_SCL=1';
fprintf('[else] D_SECURE_SCL %s\n','/D_SECURE_SCL=0');
%VS2010 In debug mode, the default value for SECURESCL is 1, .... In release mode, the default value for SECURESCL is 0.
comp_flags{end+1} = '/D_SECURE_SCL=0';
end
It is noticable such problem also occurs at opencv's matlab modual in my PC. They could be complied, but error with :
Invalid MEX-file, ..., specified module could not be found
DLL with Dependency Walker
Besides, with Dependency Walker on the MEX-files (GaussianBlur mexfiles) , I found such dll are relatived,
@echo off
rem MSVC110OPTS.BAT
rem
rem Compile and link options used for building MEX-files
rem using the Microsoft Visual C++ compiler version 11.0
rem
rem $Revision: 1.1.6.1 $ $Date: 2012/09/25 18:20:24 $
rem Copyright 2007-2012 The MathWorks, Inc.
rem
rem StorageVersion: 1.0
rem C++keyFileName: MSVC110OPTS.BAT
rem C++keyName: Microsoft Visual C++ 2012
rem C++keyManufacturer: Microsoft
rem C++keyVersion: 11.0
rem C++keyLanguage: C++
rem C++keyLinkerName: Microsoft Visual C++ 2012
rem C++keyLinkerVer: 11.0
rem
rem ********************************************************************
rem General parameters
rem ********************************************************************
set MATLAB=%MATLAB%
set VSINSTALLDIR=D:\ProgramFiles\VS2012
set VCINSTALLDIR=%VSINSTALLDIR%\VC
rem In this case, LINKERDIR is being used to specify the location of the SDK
set LINKERDIR=C:\Program Files (x86)\Windows Kits\8.0\
set PATH=%VCINSTALLDIR%\bin\amd64;%VCINSTALLDIR%\bin;%VCINSTALLDIR%\VCPackages;%VSINSTALLDIR%\Common7\IDE;%VSINSTALLDIR%\Common7\Tools;%LINKERDIR%\bin\x64;%LINKERDIR%\bin;%MATLAB_BIN%;%PATH%
set INCLUDE=%VCINSTALLDIR%\INCLUDE;%VCINSTALLDIR%\ATLMFC\INCLUDE;%LINKERDIR%\include\um;%LINKERDIR%\include\shared;%LINKERDIR%\include\winrt;%INCLUDE%
set LIB=%VCINSTALLDIR%\LIB\amd64;%VCINSTALLDIR%\ATLMFC\LIB\amd64;%LINKERDIR%\lib\win8\um\x64;%MATLAB%\extern\lib\win64;%LIB%
set MW_TARGET_ARCH=win64
rem ********************************************************************
rem Compiler parameters
rem ********************************************************************
set COMPILER=cl
set COMPFLAGS=/c /GR /W3 /EHs /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /nologo /MD
set OPTIMFLAGS=/O2 /Oy- /DNDEBUG
set DEBUGFLAGS=/Z7
set NAME_OBJECT=/Fo
rem ********************************************************************
rem Linker parameters
rem ********************************************************************
set LIBLOC=%MATLAB%\extern\lib\win64\microsoft
set LINKER=link
set LINKFLAGS=/dll /export:%ENTRYPOINT% /LIBPATH:"%LIBLOC%" libmx.lib libmex.lib libmat.lib /MACHINE:X64 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /manifest /incremental:NO /implib:"%LIB_NAME%.x" /MAP:"%OUTDIR%%MEX_NAME%%MEX_EXT%.map"
set LINKOPTIMFLAGS=
set LINKDEBUGFLAGS=/debug /PDB:"%OUTDIR%%MEX_NAME%%MEX_EXT%.pdb"
set LINK_FILE=
set LINK_LIB=
set NAME_OUTPUT=/out:"%OUTDIR%%MEX_NAME%%MEX_EXT%"
set RSP_FILE_INDICATOR=@
rem ********************************************************************
rem Resource compiler parameters
rem ********************************************************************
set RC_COMPILER=rc /fo "%OUTDIR%mexversion.res"
set RC_LINKER=
set POSTLINK_CMDS=del "%LIB_NAME%.x" "%LIB_NAME%.exp"
set POSTLINK_CMDS1=mt -outputresource:"%OUTDIR%%MEX_NAME%%MEX_EXT%;2" -manifest "%OUTDIR%%MEX_NAME%%MEX_EXT%.manifest"
set POSTLINK_CMDS2=del "%OUTDIR%%MEX_NAME%%MEX_EXT%.manifest"
set POSTLINK_CMDS3=del "%OUTDIR%%MEX_NAME%%MEX_EXT%.map"
The text was updated successfully, but these errors were encountered:
Then I don't know. It can be you're not rebooting the OS for a PATH to take effect. What I can tell is that the error message says that OpenCV dll's are not in the PATH. Check again any typos, etc.
Hi, I came across an issue :
similiar with #58 , #76
opencv run well in VS, but meet trouble in matlab
My OS environment is win8 Pro x64 + matlab2013a, I have try those
DLL with Dependency Walker
Besides, with Dependency Walker on the MEX-files (GaussianBlur mexfiles) , I found such dll are relatived,
indeed most of those could be found in the path:
It seems they are all right.
mexopts.bat files with VS2012
The text was updated successfully, but these errors were encountered: