Last active
July 15, 2021 05:36
-
-
Save y3nr1ng/e86cb888b25e444507753bdd72987037 to your computer and use it in GitHub Desktop.
Modified MATLAB compiler configuration to support Build Tools for Visual Studio 2019. Both MSVC and MSVCPP are needed for every MATLAB internals to work.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<config | |
Name="Microsoft Visual C++ 2019 (C)" | |
ShortName="MSVC160" | |
Manufacturer="Microsoft" | |
Version="16.0" | |
Language="C" | |
Priority="A" | |
Location="$VCROOT\" > | |
<Details | |
CompilerExecutable="$COMPILER" | |
CompilerDefines="$COMPDEFINES" | |
CompilerFlags="$COMPFLAGS" | |
OptimizationFlags="$OPTIMFLAGS" | |
DebugFlags="$DEBUGFLAGS" | |
IncludeFlags="$INCLUDE" | |
LinkerExecutable="$LINKER" | |
LinkerFlags="$LINKFLAGS" | |
LinkerLibraries="$LINKLIBS" | |
LinkerDebugFlags="$LINKDEBUGFLAGS" | |
LinkerOptimizationFlags="$LINKOPTIMFLAGS" | |
CommandLineShell="$VCVARSALLDIR\VCVARSALL.BAT " | |
CommandLineShellArg="amd64" | |
CompilerDefineFormatter="/D%s" | |
LinkerLibrarySwitchFormatter="lib%s.lib;%s.lib" | |
LinkerPathFormatter="/LIBPATH:%s" | |
LibrarySearchPath="$$LIB;$$LIBPATH;$$PATH;$$INCLUDE;$MATLABROOT\extern\lib\$ARCH\microsoft" | |
/> | |
<!-- Switch guide: http://msdn.microsoft.com/en-us/library/fwkeyyhe(v=vs.71).aspx --> | |
<vars | |
CMDLINE100="$COMPILER /c $COMPFLAGS $OPTIM $COMPDEFINES $INCLUDE $SRC /Fo$OBJ" | |
CMDLINE200="$LINKER $LINKFLAGS $LINKTYPE $LINKOPTIM $LINKEXPORTVER $OBJS $LINKLIBS /out:$EXE" | |
CMDLINE250="mt -outputresource:$EXE;2 -manifest $MANIFEST" | |
CMDLINE300="del $EXP $LIB $MANIFEST $ILK" | |
COMPILER="cl" | |
COMPFLAGS="/Zp8 /GR /W3 /EHs /nologo /MD" | |
COMPDEFINES="/D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 $MATLABMEX" | |
MATLABMEX=" /DMATLAB_MEX_FILE" | |
OPTIMFLAGS="/O2 /Oy- /DNDEBUG" | |
INCLUDE="-I"$MATLABROOT\extern\include" -I"$MATLABROOT\simulink\include"" | |
DEBUGFLAGS="/Z7" | |
LINKER="link" | |
LINKFLAGS="/nologo /manifest " | |
LINKTYPE="/DLL" | |
LINKEXPORT="/EXPORT:mexFunction" | |
LINKEXPORTVER="/EXPORT:mexFunction /EXPORT:mexfilerequiredapiversion" | |
LINKLIBS="/LIBPATH:"$MATLABROOT\extern\lib\$ARCH\microsoft" libmx.lib libmex.lib libmat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib" | |
LINKDEBUGFLAGS="/debug /PDB:"$TEMPNAME$LDEXT.pdb"" | |
LINKOPTIMFLAGS="" | |
OBJEXT=".obj" | |
LDEXT=".mexw64" | |
SETENV="set COMPILER=$COMPILER | |
set COMPFLAGS=/c $COMPFLAGS $COMPDEFINES $MATLABMEX | |
set OPTIMFLAGS=$OPTIMFLAGS | |
set DEBUGFLAGS=$DEBUGFLAGS | |
set LINKER=$LINKER | |
set LINKFLAGS=$LINKFLAGS /export:%ENTRYPOINT% $LINKTYPE $LINKLIBS $LINKEXPORT | |
set LINKDEBUGFLAGS=/debug /PDB:"%OUTDIR%%MEX_NAME%$LDEXT.pdb" | |
set NAME_OUTPUT=/out:"%OUTDIR%%MEX_NAME%%MEX_EXT%"" | |
/> | |
<client> | |
<engine | |
LINKLIBS="$LINKLIBS libeng.lib" | |
LINKEXPORT="" | |
LINKEXPORTVER="" | |
LDEXT=".exe" | |
LINKTYPE="" | |
MATLABMEX="" | |
/> | |
<mbuild | |
CMDLINE100="$COMPILER /c $COMPFLAGS $OPTIM $COMPDEFINES $INCLUDE $SRC /Fo$OBJ" | |
CMDLINE200="$LINKER $LINKFLAGS $LINKTYPE $LINKOPTIM $LINKEXPORT $OBJS $LINKLIBS /out:$EXE" | |
CMDLINE250="$MTCMDLINE" | |
CMDLINE300="del $MANIFEST "$TEMPNAME.map" " | |
LINKFLAGS="/nologo /manifest" | |
LINKLIBS="/MACHINE:AMD64 /LIBPATH:"$MATLABROOT\extern\lib\$ARCH\microsoft" mclmcrrt.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib" | |
INCLUDE="-I"$MATLABROOT\extern\include" -I"$MATLABROOT\extern\include\$ARCH"" | |
COMPFLAGS="-MD -Zp8 -GR -W3 -EHsc- -Zc:wchar_t- -nologo" | |
COMPDEFINES="/DMSVC /DIBMPC /D_CRT_SECURE_NO_DEPRECATE" | |
OPTIMFLAGS="-O2 -DNDEBUG" | |
LINKEXPORT="" | |
LINKEXPORTVER="" | |
LDEXT=".exe" | |
MATLABMEX="" | |
MTCMDLINE="mt -outputresource:$EXE;1 -manifest $MANIFEST" | |
LINKTYPE="" | |
LINKDEBUGFLAGS="/debug /PDB:"$TEMPNAME.pdb"" | |
/> | |
<mbuild_com | |
CMDLINE000="copy "$MATLABROOT\extern\include\$ARCH\mwcomutil.tlb" ." | |
CMDLINE001="midl /nologo /$ARCH $COMPINCLUDE /D NDEBUG /out "$OUTDIR" mwcomtypes.idl" | |
CMDLINE002="midl /nologo /$ARCH $COMPINCLUDE /D NDEBUG /out "$OUTDIR" "$COMIDL"" | |
CMDLINE100="$COMPILER $COMPFLAGS $OPTIM $COMPDEFINES $INCLUDE $COMPINCLUDE $SRC /Fo$OBJ" | |
CMDLINE150="rc /fo "$RESFILE" "$RCFILE"" | |
CMDLINE250="mt -outputresource:$EXE;2 -manifest $MANIFEST" | |
CMDLINE275=""$MATLABROOT\runtime\$ARCH\mwregsvr.exe" $EXE" | |
CMDLINE300="del $MANIFEST mwcomutil.tlb "$RESFILE"" | |
OUTDIR="." | |
INCLUDE="$INCLUDE -I"$OUTDIR" -I"$MATLABROOT\extern\include\$ARCH"" | |
COMPFLAGS="/c /GR /W3 /EHsc- -Zc:wchar_t /nologo /MT" | |
COMPDEFINES="/DMSVC /DIBMPC /D_CRT_SECURE_NO_DEPRECATE" | |
COMPINCLUDE="-I"$MATLABROOT\extern\include"" | |
LINKEXPORT="/DLL /def:"$DEFFILE"" | |
LINKEXPORTVER="/DLL /def:"$DEFFILE"" | |
LINKLIBS="/MACHINE:AMD64 $LINKLIBS mclmcrrt.lib $MCLMAINLIB_MS "$RESFILE"" | |
LDEXT=".dll" | |
USERONLY="" | |
LINKTYPE="" | |
MATLABMEX="" | |
/> | |
</client> | |
<locationFinder> | |
<VCROOT> | |
<or> | |
<and> | |
<envVarExists name="ProgramFiles(x86)" /> | |
<fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /> | |
<cmdReturns name=""$$\\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Enterprise -property installationPath -format value" /> | |
<cmdReturns name="set "vcroot=$$"&for /f "delims= " %a in ('type "$$\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt"') do @if exist "$$\VC\Tools\MSVC\%a\bin\HostX64\x64\cl.exe" call echo %vcroot%" /> | |
</and> | |
<and> | |
<envVarExists name="ProgramFiles(x86)" /> | |
<fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /> | |
<cmdReturns name=""$$\\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Professional -property installationPath -format value" /> | |
<cmdReturns name="set "vcroot=$$"&for /f "delims= " %a in ('type "$$\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt"') do @if exist "$$\VC\Tools\MSVC\%a\bin\HostX64\x64\cl.exe" call echo %vcroot%" /> | |
</and> | |
<and> | |
<envVarExists name="ProgramFiles(x86)" /> | |
<fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /> | |
<cmdReturns name=""$$\\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Community -property installationPath -format value" /> | |
<cmdReturns name="set "vcroot=$$"&for /f "delims= " %a in ('type "$$\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt"') do @if exist "$$\VC\Tools\MSVC\%a\bin\HostX64\x64\cl.exe" call echo %vcroot%" /> | |
</and> | |
<and> | |
<envVarExists name="ProgramFiles(x86)" /> | |
<fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /> | |
<cmdReturns name=""$$\\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.BuildTools -property installationPath -format value" /> | |
<cmdReturns name="set "vcroot=$$"&for /f "delims= " %a in ('type "$$\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt"') do @if exist "$$\VC\Tools\MSVC\%a\bin\HostX64\x64\cl.exe" call echo %vcroot%" /> | |
</and> | |
</or> | |
</VCROOT> | |
<SDKROOT> | |
<or> | |
<hklmExists path="SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0" name="InstallationFolder" /> | |
<hkcuExists path="SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0" name="InstallationFolder" /> | |
<hklmExists path="SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0" name="InstallationFolder" /> | |
<hkcuExists path="SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0" name="InstallationFolder" /> | |
</or> | |
</SDKROOT> | |
<VSINSTALLDIR> | |
<or> | |
<and> | |
<envVarExists name="ProgramFiles(x86)" /> | |
<fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /> | |
<cmdReturns name=""$$\\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Enterprise -property installationPath -format value" /> | |
</and> | |
<and> | |
<envVarExists name="ProgramFiles(x86)" /> | |
<fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /> | |
<cmdReturns name=""$$\\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Professional -property installationPath -format value" /> | |
</and> | |
<and> | |
<envVarExists name="ProgramFiles(x86)" /> | |
<fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /> | |
<cmdReturns name=""$$\\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Community -property installationPath -format value" /> | |
</and> | |
<and> | |
<envVarExists name="ProgramFiles(x86)" /> | |
<fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /> | |
<cmdReturns name=""$$\\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.BuildTools -property installationPath -format value" /> | |
</and> | |
</or> | |
</VSINSTALLDIR> | |
<VCINSTALLDIR> | |
<or> | |
<and> | |
<envVarExists name="ProgramFiles(x86)" /> | |
<fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /> | |
<cmdReturns name=""$$\\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Enterprise -property installationPath -format value" /> | |
<cmdReturns name="set "vcroot=$$"&for /f "delims= " %a in ('type "$$\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt"') do @if exist "$$\VC\Tools\MSVC\%a\bin\HostX64\x64\cl.exe" call echo %vcroot%\VC\Tools\MSVC\%a" /> | |
</and> | |
<and> | |
<envVarExists name="ProgramFiles(x86)" /> | |
<fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /> | |
<cmdReturns name=""$$\\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Professional -property installationPath -format value" /> | |
<cmdReturns name="set "vcroot=$$"&for /f "delims= " %a in ('type "$$\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt"') do @if exist "$$\VC\Tools\MSVC\%a\bin\HostX64\x64\cl.exe" call echo %vcroot%\VC\Tools\MSVC\%a" /> | |
</and> | |
<and> | |
<envVarExists name="ProgramFiles(x86)" /> | |
<fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /> | |
<cmdReturns name=""$$\\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Community -property installationPath -format value" /> | |
<cmdReturns name="set "vcroot=$$"&for /f "delims= " %a in ('type "$$\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt"') do @if exist "$$\VC\Tools\MSVC\%a\bin\HostX64\x64\cl.exe" call echo %vcroot%\VC\Tools\MSVC\%a" /> | |
</and> | |
<and> | |
<envVarExists name="ProgramFiles(x86)" /> | |
<fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /> | |
<cmdReturns name=""$$\\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.BuildTools -property installationPath -format value" /> | |
<cmdReturns name="set "vcroot=$$"&for /f "delims= " %a in ('type "$$\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt"') do @if exist "$$\VC\Tools\MSVC\%a\bin\HostX64\x64\cl.exe" call echo %vcroot%\VC\Tools\MSVC\%a" /> | |
</and> | |
</or> | |
</VCINSTALLDIR> | |
<VCVARSALLDIR> | |
<or> | |
<and> | |
<envVarExists name="ProgramFiles(x86)" /> | |
<fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /> | |
<cmdReturns name=""$$\\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Enterprise -property installationPath -format value" /> | |
<fileExists name="$$\VC\Auxiliary\Build\vcvarsall.bat" /> | |
<dirExists name="$$"/> | |
</and> | |
<and> | |
<envVarExists name="ProgramFiles(x86)" /> | |
<fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /> | |
<cmdReturns name=""$$\\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Professional -property installationPath -format value" /> | |
<fileExists name="$$\VC\Auxiliary\Build\vcvarsall.bat" /> | |
<dirExists name="$$"/> | |
</and> | |
<and> | |
<envVarExists name="ProgramFiles(x86)" /> | |
<fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /> | |
<cmdReturns name=""$$\\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Community -property installationPath -format value" /> | |
<fileExists name="$$\VC\Auxiliary\Build\vcvarsall.bat" /> | |
<dirExists name="$$"/> | |
</and> | |
<and> | |
<envVarExists name="ProgramFiles(x86)" /> | |
<fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /> | |
<cmdReturns name=""$$\\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.BuildTools -property installationPath -format value" /> | |
<fileExists name="$$\VC\Auxiliary\Build\vcvarsall.bat" /> | |
<dirExists name="$$"/> | |
</and> | |
</or> | |
</VCVARSALLDIR> | |
<KITSROOT> | |
<or> | |
<hklmExists path="SOFTWARE\Wow6432Node\Microsoft\Windows Kits\Installed Roots" name="KitsRoot10" /> | |
<hkcuExists path="SOFTWARE\Wow6432Node\Microsoft\Windows Kits\Installed Roots" name="KitsRoot10" /> | |
<hklmExists path="SOFTWARE\Microsoft\Windows Kits\Installed Roots" name="KitsRoot10" /> | |
<hkcuExists path="SOFTWARE\Microsoft\Windows Kits\Installed Roots" name="KitsRoot10" /> | |
</or> | |
</KITSROOT> | |
<SDKVERSION> | |
<and> | |
<or> | |
<hklmExists path="SOFTWARE\Wow6432Node\Microsoft\Windows Kits\Installed Roots" name="KitsRoot10" /> | |
<hkcuExists path="SOFTWARE\Wow6432Node\Microsoft\Windows Kits\Installed Roots" name="KitsRoot10" /> | |
<hklmExists path="SOFTWARE\Microsoft\Windows Kits\Installed Roots" name="KitsRoot10" /> | |
<hkcuExists path="SOFTWARE\Microsoft\Windows Kits\Installed Roots" name="KitsRoot10" /> | |
</or> | |
<!-- For each folder inside '<KITSROOT>\include' check for 'ucrt' and if exists return that folder name --> | |
<cmdReturns name="echo off&set "sdkversion="&(for /f %a IN ('dir "$$\include\" /b /ad-h /on') do ( @if exist "$$\include\%a\ucrt\" set "sdkversion=%a" ))&call echo %sdkversion%" /> | |
</and> | |
</SDKVERSION> | |
</locationFinder> | |
<env | |
PATH="$VCINSTALLDIR\bin\HostX64\x64\;$VCROOT\Common7\IDE\VC\vcpackages;$VCROOT\Common7\IDE;$VCROOT\Common7\Tools;$SDKROOT\Bin\$SDKVERSION\x64;$SDKROOT\Bin\$SDKVERSION\x86;$SDKROOT\Bin\x64;$SDKROOT\Bin\x86;" | |
INCLUDE="$VCINSTALLDIR\include;$VCINSTALLDIR\atlmfc\include;$KITSROOT\include\$SDKVERSION\ucrt;$KITSROOT\include\$SDKVERSION\shared;$KITSROOT\include\$SDKVERSION\um;$KITSROOT\include\$SDKVERSION\winrt;$MATLABROOT\extern\include" | |
LIB="$VCINSTALLDIR\lib\x64;$VCINSTALLDIR\atlmfc\lib\x64;$KITSROOT\Lib\$SDKVERSION\ucrt\x64;$KITSROOT\lib\$SDKVERSION\um\x64;$MATLABROOT\lib\$ARCH" | |
LIBPATH="$VCINSTALLDIR\lib\x64;$VCINSTALLDIR\atlmfc\lib\x64" | |
/> | |
</config> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8" ?> | |
<config | |
Name="Microsoft Visual C++ 2019" | |
ShortName="MSVCPP160" | |
Manufacturer="Microsoft" | |
Version="16.0" | |
Language="C++" | |
Priority="A" | |
Location="$VCROOT\" > | |
<Details | |
CompilerExecutable="$COMPILER" | |
CompilerDefines="$COMPDEFINES" | |
CompilerFlags="$COMPFLAGS" | |
OptimizationFlags="$OPTIMFLAGS" | |
DebugFlags="$DEBUGFLAGS" | |
IncludeFlags="$INCLUDE" | |
LinkerExecutable="$LINKER" | |
LinkerFlags="$LINKFLAGS $LINKTYPE" | |
LinkerLibraries="$LINKLIBS" | |
LinkerDebugFlags="$LINKDEBUGFLAGS" | |
LinkerOptimizationFlags="$LINKOPTIMFLAGS" | |
CommandLineShell="$VCVARSALLDIR\VCVARSALL.BAT " | |
CommandLineShellArg="amd64" | |
CompilerDefineFormatter="/D%s" | |
LinkerLibrarySwitchFormatter="lib%s.lib;%s.lib" | |
LinkerPathFormatter="/LIBPATH:%s" | |
LibrarySearchPath="$$LIB;$$LIBPATH;$$PATH;$$INCLUDE;$MATLABROOT\extern\lib\$ARCH\microsoft" | |
/> | |
<!-- Switch guide: http://msdn.microsoft.com/en-us/library/fwkeyyhe(v=vs.71).aspx --> | |
<vars | |
CMDLINE100="$COMPILER /c $COMPFLAGS $OPTIM $COMPDEFINES $INCLUDE $SRC /Fo$OBJ" | |
CMDLINE200="$LINKER $LINKFLAGS $LINKTYPE $LINKOPTIM $LINKEXPORTVER $OBJS $LINKLIBS /out:$EXE" | |
CMDLINE250="mt -outputresource:$EXE;2 -manifest $MANIFEST" | |
CMDLINE300="del $EXP $LIB $MANIFEST $ILK" | |
COMPILER="cl" | |
COMPFLAGS="/Zp8 /GR /W3 /EHs /nologo /MD" | |
COMPDEFINES="/D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 $MATLABMEX" | |
MATLABMEX=" /DMATLAB_MEX_FILE" | |
OPTIMFLAGS="/O2 /Oy- /DNDEBUG" | |
INCLUDE="-I"$MATLABROOT\extern\include" -I"$MATLABROOT\simulink\include"" | |
DEBUGFLAGS="/Z7" | |
LINKER="link" | |
LINKFLAGS="/nologo /manifest " | |
LINKTYPE="/DLL" | |
LINKEXPORT="/EXPORT:mexFunction" | |
LINKEXPORTVER="/EXPORT:mexFunction /EXPORT:mexfilerequiredapiversion" | |
LINKLIBS="/LIBPATH:"$MATLABROOT\extern\lib\$ARCH\microsoft" libmx.lib libmex.lib libmat.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib libMatlabDataArray.lib libMatlabEngine.lib" | |
LINKDEBUGFLAGS="/debug /PDB:"$TEMPNAME$LDEXT.pdb"" | |
LINKOPTIMFLAGS="" | |
OBJEXT=".obj" | |
LDEXT=".mexw64" | |
SETENV="set COMPILER=$COMPILER | |
set COMPFLAGS=/c $COMPFLAGS $COMPDEFINES $MATLABMEX | |
set OPTIMFLAGS=$OPTIMFLAGS | |
set DEBUGFLAGS=$DEBUGFLAGS | |
set LINKER=$LINKER | |
set LINKFLAGS=$LINKFLAGS /export:%ENTRYPOINT% $LINKTYPE $LINKLIBS $LINKEXPORT | |
set LINKDEBUGFLAGS=/debug /PDB:"%OUTDIR%%MEX_NAME%$LDEXT.pdb" | |
set NAME_OUTPUT=/out:"%OUTDIR%%MEX_NAME%%MEX_EXT%"" | |
/> | |
<client> | |
<engine | |
LINKLIBS="$LINKLIBS libeng.lib libMatlabDataArray.lib libMatlabEngine.lib" | |
LINKEXPORT="" | |
LINKEXPORTVER="" | |
LDEXT=".exe" | |
LINKTYPE="" | |
MATLABMEX="" | |
/> | |
<mbuild | |
CMDLINE100="$COMPILER /c $COMPFLAGS $OPTIM $COMPDEFINES $INCLUDE $SRC /Fo$OBJ /UMX_COMPAT_SC" | |
CMDLINE200="$LINKER $LINKFLAGS $LINKTYPE $LINKOPTIM $LINKEXPORT $OBJS $LINKLIBS /out:$EXE" | |
CMDLINE250="$MTCMDLINE" | |
CMDLINE300="del $MANIFEST "$TEMPNAME.map"" | |
LINKFLAGS="/nologo /manifest /DELAYLOAD:libMatlabDataArray.dll" | |
LINKLIBS="/MACHINE:AMD64 /LIBPATH:"$MATLABROOT\extern\lib\$ARCH\microsoft" libMatlabDataArray.lib libMatlabCppSharedLib.lib mclmcrrt.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib delayimp.lib" | |
INCLUDE="-I"$MATLABROOT\extern\include" -I"$MATLABROOT\extern\include\$ARCH"" | |
COMPFLAGS="-MD -Zp8 -GR -W3 -EHsc- -nologo" | |
COMPDEFINES="/DMSVC /DIBMPC /D_CRT_SECURE_NO_DEPRECATE" | |
OPTIMFLAGS="-O2 -DNDEBUG" | |
LINKEXPORT="" | |
LINKEXPORTVER="" | |
LDEXT=".exe" | |
MATLABMEX="" | |
MTCMDLINE="mt -outputresource:$EXE;1 -manifest $MANIFEST" | |
LINKTYPE="" | |
LINKDEBUGFLAGS="/debug /PDB:"$TEMPNAME.pdb"" | |
/> | |
<mbuild_com | |
CMDLINE000="copy "$MATLABROOT\extern\include\$ARCH\mwcomutil.tlb" "$OUTDIR"" | |
CMDLINE001="midl /nologo /$ARCH $COMPINCLUDE /D NDEBUG /out "$OUTDIR" mwcomtypes.idl" | |
CMDLINE002="midl /nologo /$ARCH $COMPINCLUDE /D NDEBUG /out "$OUTDIR" "$COMIDL"" | |
CMDLINE100="$COMPILER $COMPFLAGS $OPTIM $COMPDEFINES $INCLUDE $COMPINCLUDE $SRC /Fo$OBJ" | |
CMDLINE150="rc /fo "$RESFILE" "$RCFILE"" | |
CMDLINE250="mt -outputresource:$EXE;2 -manifest $MANIFEST" | |
CMDLINE275=""$MATLABROOT\runtime\$ARCH\mwregsvr.exe" $EXE" | |
CMDLINE300="del $MANIFEST "$OUTDIR\mwcomutil.tlb" "$RESFILE"" | |
OUTDIR="." | |
INCLUDE="$INCLUDE -I"$OUTDIR" -I"$MATLABROOT\extern\include\$ARCH"" | |
COMPFLAGS="/c /GR /W3 /EHsc- /nologo /MT" | |
COMPDEFINES="/DMSVC /DIBMPC /D_CRT_SECURE_NO_DEPRECATE /D_SECURE_SCL=0" | |
COMPINCLUDE="-I"$MATLABROOT\extern\include" -I"$OUTDIR"" | |
LINKEXPORT="/DLL /def:"$DEFFILE"" | |
LINKEXPORTVER="/DLL /def:"$DEFFILE"" | |
LINKLIBS="/MACHINE:AMD64 $LINKLIBS mclmcrrt.lib $MCLMAINLIB_MS "$RESFILE"" | |
LDEXT=".dll" | |
USERONLY="" | |
LINKTYPE="" | |
MATLABMEX="" | |
/> | |
</client> | |
<locationFinder> | |
<VCROOT> | |
<or> | |
<and> | |
<envVarExists name="ProgramFiles(x86)" /> | |
<fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /> | |
<cmdReturns name=""$$\\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Enterprise -property installationPath -format value" /> | |
<cmdReturns name="set "vcroot=$$"&for /f "delims= " %a in ('type "$$\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt"') do @if exist "$$\VC\Tools\MSVC\%a\bin\HostX64\x64\cl.exe" call echo %vcroot%" /> | |
</and> | |
<and> | |
<envVarExists name="ProgramFiles(x86)" /> | |
<fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /> | |
<cmdReturns name=""$$\\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Professional -property installationPath -format value" /> | |
<cmdReturns name="set "vcroot=$$"&for /f "delims= " %a in ('type "$$\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt"') do @if exist "$$\VC\Tools\MSVC\%a\bin\HostX64\x64\cl.exe" call echo %vcroot%" /> | |
</and> | |
<and> | |
<envVarExists name="ProgramFiles(x86)" /> | |
<fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /> | |
<cmdReturns name=""$$\\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Community -property installationPath -format value" /> | |
<cmdReturns name="set "vcroot=$$"&for /f "delims= " %a in ('type "$$\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt"') do @if exist "$$\VC\Tools\MSVC\%a\bin\HostX64\x64\cl.exe" call echo %vcroot%" /> | |
</and> | |
<and> | |
<envVarExists name="ProgramFiles(x86)" /> | |
<fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /> | |
<cmdReturns name=""$$\\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.BuildTools -property installationPath -format value" /> | |
<cmdReturns name="set "vcroot=$$"&for /f "delims= " %a in ('type "$$\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt"') do @if exist "$$\VC\Tools\MSVC\%a\bin\HostX64\x64\cl.exe" call echo %vcroot%" /> | |
</and> | |
</or> | |
</VCROOT> | |
<SDKROOT> | |
<or> | |
<hklmExists path="SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0" name="InstallationFolder" /> | |
<hkcuExists path="SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0" name="InstallationFolder" /> | |
<hklmExists path="SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0" name="InstallationFolder" /> | |
<hkcuExists path="SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0" name="InstallationFolder" /> | |
</or> | |
</SDKROOT> | |
<VSINSTALLDIR> | |
<or> | |
<and> | |
<envVarExists name="ProgramFiles(x86)" /> | |
<fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /> | |
<cmdReturns name=""$$\\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Enterprise -property installationPath -format value" /> | |
</and> | |
<and> | |
<envVarExists name="ProgramFiles(x86)" /> | |
<fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /> | |
<cmdReturns name=""$$\\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Professional -property installationPath -format value" /> | |
</and> | |
<and> | |
<envVarExists name="ProgramFiles(x86)" /> | |
<fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /> | |
<cmdReturns name=""$$\\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Community -property installationPath -format value" /> | |
</and> | |
<and> | |
<envVarExists name="ProgramFiles(x86)" /> | |
<fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /> | |
<cmdReturns name=""$$\\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.BuildTools -property installationPath -format value" /> | |
</and> | |
</or> | |
</VSINSTALLDIR> | |
<VCINSTALLDIR> | |
<or> | |
<and> | |
<envVarExists name="ProgramFiles(x86)" /> | |
<fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /> | |
<cmdReturns name=""$$\\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Enterprise -property installationPath -format value" /> | |
<cmdReturns name="set "vcroot=$$"&for /f "delims= " %a in ('type "$$\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt"') do @if exist "$$\VC\Tools\MSVC\%a\bin\HostX64\x64\cl.exe" call echo %vcroot%\VC\Tools\MSVC\%a" /> | |
</and> | |
<and> | |
<envVarExists name="ProgramFiles(x86)" /> | |
<fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /> | |
<cmdReturns name=""$$\\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Professional -property installationPath -format value" /> | |
<cmdReturns name="set "vcroot=$$"&for /f "delims= " %a in ('type "$$\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt"') do @if exist "$$\VC\Tools\MSVC\%a\bin\HostX64\x64\cl.exe" call echo %vcroot%\VC\Tools\MSVC\%a" /> | |
</and> | |
<and> | |
<envVarExists name="ProgramFiles(x86)" /> | |
<fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /> | |
<cmdReturns name=""$$\\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Community -property installationPath -format value" /> | |
<cmdReturns name="set "vcroot=$$"&for /f "delims= " %a in ('type "$$\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt"') do @if exist "$$\VC\Tools\MSVC\%a\bin\HostX64\x64\cl.exe" call echo %vcroot%\VC\Tools\MSVC\%a" /> | |
</and> | |
<and> | |
<envVarExists name="ProgramFiles(x86)" /> | |
<fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /> | |
<cmdReturns name=""$$\\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.BuildTools -property installationPath -format value" /> | |
<cmdReturns name="set "vcroot=$$"&for /f "delims= " %a in ('type "$$\VC\Auxiliary\Build\Microsoft.VCToolsVersion.default.txt"') do @if exist "$$\VC\Tools\MSVC\%a\bin\HostX64\x64\cl.exe" call echo %vcroot%\VC\Tools\MSVC\%a" /> | |
</and> | |
</or> | |
</VCINSTALLDIR> | |
<VCVARSALLDIR> | |
<or> | |
<and> | |
<envVarExists name="ProgramFiles(x86)" /> | |
<fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /> | |
<cmdReturns name=""$$\\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Enterprise -property installationPath -format value" /> | |
<fileExists name="$$\VC\Auxiliary\Build\vcvarsall.bat" /> | |
<dirExists name="$$"/> | |
</and> | |
<and> | |
<envVarExists name="ProgramFiles(x86)" /> | |
<fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /> | |
<cmdReturns name=""$$\\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Professional -property installationPath -format value" /> | |
<fileExists name="$$\VC\Auxiliary\Build\vcvarsall.bat" /> | |
<dirExists name="$$"/> | |
</and> | |
<and> | |
<envVarExists name="ProgramFiles(x86)" /> | |
<fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /> | |
<cmdReturns name=""$$\\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.Community -property installationPath -format value" /> | |
<fileExists name="$$\VC\Auxiliary\Build\vcvarsall.bat" /> | |
<dirExists name="$$"/> | |
</and> | |
<and> | |
<envVarExists name="ProgramFiles(x86)" /> | |
<fileExists name="$$\Microsoft Visual Studio\Installer\vswhere.exe" /> | |
<cmdReturns name=""$$\\vswhere.exe" -version "[16.0,17.0)" -products Microsoft.VisualStudio.Product.BuildTools -property installationPath -format value" /> | |
<fileExists name="$$\VC\Auxiliary\Build\vcvarsall.bat" /> | |
<dirExists name="$$"/> | |
</and> | |
</or> | |
</VCVARSALLDIR> | |
<KITSROOT> | |
<or> | |
<hklmExists path="SOFTWARE\Wow6432Node\Microsoft\Windows Kits\Installed Roots" name="KitsRoot10" /> | |
<hkcuExists path="SOFTWARE\Wow6432Node\Microsoft\Windows Kits\Installed Roots" name="KitsRoot10" /> | |
<hklmExists path="SOFTWARE\Microsoft\Windows Kits\Installed Roots" name="KitsRoot10" /> | |
<hkcuExists path="SOFTWARE\Microsoft\Windows Kits\Installed Roots" name="KitsRoot10" /> | |
</or> | |
</KITSROOT> | |
<SDKVERSION> | |
<and> | |
<or> | |
<hklmExists path="SOFTWARE\Wow6432Node\Microsoft\Windows Kits\Installed Roots" name="KitsRoot10" /> | |
<hkcuExists path="SOFTWARE\Wow6432Node\Microsoft\Windows Kits\Installed Roots" name="KitsRoot10" /> | |
<hklmExists path="SOFTWARE\Microsoft\Windows Kits\Installed Roots" name="KitsRoot10" /> | |
<hkcuExists path="SOFTWARE\Microsoft\Windows Kits\Installed Roots" name="KitsRoot10" /> | |
</or> | |
<!-- For each folder inside '<KITSROOT>\include' check for 'ucrt' and if exists return that folder name --> | |
<cmdReturns name="echo off&set "sdkversion="&(for /f %a IN ('dir "$$\include\" /b /ad-h /on') do ( @if exist "$$\include\%a\ucrt\" set "sdkversion=%a" ))&call echo %sdkversion%" /> | |
</and> | |
</SDKVERSION> | |
</locationFinder> | |
<env | |
PATH="$VCINSTALLDIR\bin\HostX64\x64\;$VCROOT\Common7\IDE\VC\vcpackages;$VCROOT\Common7\IDE;$VCROOT\Common7\Tools;$SDKROOT\Bin\$SDKVERSION\x64;$SDKROOT\Bin\$SDKVERSION\x86;$SDKROOT\Bin\x64;$SDKROOT\Bin\x86;" | |
INCLUDE="$VCINSTALLDIR\include;$VCINSTALLDIR\atlmfc\include;$KITSROOT\include\$SDKVERSION\ucrt;$KITSROOT\include\$SDKVERSION\shared;$KITSROOT\include\$SDKVERSION\um;$KITSROOT\include\$SDKVERSION\winrt;$MATLABROOT\extern\include" | |
LIB="$VCINSTALLDIR\lib\x64;$VCINSTALLDIR\atlmfc\lib\x64;$KITSROOT\Lib\$SDKVERSION\ucrt\x64;$KITSROOT\lib\$SDKVERSION\um\x64;$MATLABROOT\lib\$ARCH" | |
LIBPATH="$VCINSTALLDIR\lib\x64;$VCINSTALLDIR\atlmfc\lib\x64" | |
/> | |
</config> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment