Matlab crashes when invoking functions from intel MKL - fortran

I'm trying to link Fortran code with Matlab using the Mex function. I can successfully compile and link the code using the following instruction:
mex COMPFLAGS="$COMPFLAGS -Qopenmp -Qmkl"...
'-IC:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\mkl\include'...
'-LC:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\mkl\lib\intel64'...
-lmkl_intel_ilp64.lib -lmkl_intel_thread.lib -lmkl_core.lib libiomp5md.lib...
ero_dep_fortran.F Module.F prepare_bank_collapse.F LINEAR_ELASTIC_STIFFNESS.F FAILURE_CRITERION.F OUTPUT.F pardisonew.F
However, when I execute the generated .mexw64 function, Matlab crashes without any error information. Then I debug my Fortran code line by line, and I found that Matlab crashes when invoking the function pardiso which comes from Intel MKL library. It seems that when invoking function from MKL, Matlab will crash and I have no idea how to fix it.
Any suggestions will be appreciated.
PS: Thanks for the help from #Evg. Finally, the following instruction works:
mex COMPFLAGS="$COMPFLAGS -Qopenmp"...
'-IC:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\mkl\include'...
'-LC:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\mkl\lib\intel64'...
-lmkl_intel_ilp64.lib -lmkl_intel_thread.lib -lmkl_core.lib libiomp5md.lib...
ero_dep_fortran.F Module.F prepare_bank_collapse.F LINEAR_ELASTIC_STIFFNESS.F FAILURE_CRITERION.F OUTPUT.F pardisonew.F
Previous Additions:
I also try to run the code on the Intel Parallel Studio XE 2017 compiler using makefile as:
ifort Module.F OUTPUT.F FAILURE_CRITERION.F pardisonew.F LINEAR_ELASTIC_STIFFNESS.F prepare_bank_collapse.F ero_dep_fortran.F /Qopenmp /Qmkl /nostandard-realloc-lhs /MD -o BANK_COLLAPSE.exe
The generated .exe works. So the problem is not due to the code self or the function pardiso from Intel MKL library. I guess there is something wrong when Matlab invokes pardiso, although it 'seems' to link sucessfully.
I use Matlab 2019b and Intel Parallel Studio XE 2017 for Fortran with Microsoft Visual Studio 2015 to compile and link the code.
The full output after compiling mex with -voption is
Verbose mode is on.
... Looking for compiler 'Intel Parallel Studio XE 2017 for Fortran with Microsoft Visual Studio 2015' ...
... Looking for environment variable 'IFORT_COMPILER17' ...Yes ('C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\').
... Looking for file 'C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\Bin\intel64\ifort.exe' ...Yes.
... Looking for folder 'C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows' ...Yes.
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 14.0 ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\VisualStudio\SxS\VS7' 14.0 ...No.
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\SxS\VS7' 14.0 ...Yes ('C:\Program Files (x86)\Microsoft Visual Studio 14.0\').
... Looking for file 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\cl.exe' ...Yes.
... Looking for folder 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC' ...Yes.
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1' InstallationFolder ...No.
... Looking for registry setting 'HKCU\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v8.1' InstallationFolder ...No.
... Looking for registry setting 'HKLM\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v8.1' InstallationFolder ...Yes ('C:\Program Files (x86)\Windows Kits\8.1\').
... Looking for registry setting 'HKLM\SOFTWARE\Microsoft\Windows Kits\Installed Roots' KitsRoot10 ...Yes ('C:\Program Files (x86)\Windows Kits\10\').
Found installed compiler 'Intel Parallel Studio XE 2017 for Fortran with Microsoft Visual Studio 2015'.
Set PATH = C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\bin\intel64;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\VCPackages;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\..\Common7\IDE;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\..\Common7\Tools;C:\Program Files (x86)\Windows Kits\8.1\\bin\x64;C:\Program Files (x86)\Windows Kits\8.1\\Bin\x86;;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\mpi\intel64\bin;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.4.210\windows\mpi\intel64\bin;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64_win\mpirt;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\ia32_win\mpirt;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\intel64_win\compiler;C:\Program Files (x86)\Common Files\Intel\Shared Libraries\redist\ia32_win\compiler;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS\;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\Intel\WiFi;C:\Users\zk1357\AppData\Local\Microsoft\WindowsApps;C:\Users\zk1357\AppData\Roaming\npm;C:\Delft3D\w32\lib;C:\PROGRA~1\Deltares\w32\lib;C:\Program Files\TortoiseSVN\bin;C:\Program Files\MATLAB\MATLAB Compiler Runtime\v82\runtime\win64;"C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Windows\SysWOW64";C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\WINDOWS\system32;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Polyspace\R2019b\runtime\win64;C:\Program Files\Polyspace\R2019b\bin;C:\Program Files\Polyspace\R2019b\polyspace\bin;C:\Users\zk1357\AppData\Local\Microsoft\WindowsApps;C:\Users\zk1357\AppData\Roaming\npm;"C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem";C:\Program Files (x86)\IntelSWTools\parallel_studio_xe_2017.5.060\compilers_and_libraries_2017\windows\bin\intel64;C:\Users\zk1357\iRIC\guis\prepost;
Set INCLUDE = C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\include;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\compiler\include;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE;C:\Program Files (x86)\Windows Kits\10\\include\10.0.10150.0\ucrt;C:\Program Files (x86)\Windows Kits\8.1\\include\shared;C:\Program Files (x86)\Windows Kits\8.1\\include\um;C:\Program Files (x86)\Windows Kits\8.1\\include\winrt;C:\Program Files\Polyspace\R2019b\extern\include;;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\include;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\compiler\include;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE;C:\Program Files (x86)\Windows Kits\10\\include\10.0.10150.0\ucrt;C:\Program Files (x86)\Windows Kits\8.1\\include\shared;C:\Program Files (x86)\Windows Kits\8.1\\include\um;C:\Program Files (x86)\Windows Kits\8.1\\include\winrt;C:\Program Files\Polyspace\R2019b\extern\include;;
Set LIB = C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\lib\intel64;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\compiler\lib\intel64;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\compiler\lib\intel64_win;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\Lib\amd64;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\Lib\amd64;C:\Program Files (x86)\Windows Kits\10\\Lib\10.0.10150.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\8.1\\lib\winv6.3\um\x64;C:\Program Files\Polyspace\R2019b\lib\win64;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\lib\intel64;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\compiler\lib\intel64;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\compiler\lib\intel64_win;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\Lib\amd64;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\Lib\amd64;C:\Program Files (x86)\Windows Kits\10\\Lib\10.0.10150.0\ucrt\x64;C:\Program Files (x86)\Windows Kits\8.1\\lib\winv6.3\um\x64;C:\Program Files\Polyspace\R2019b\lib\win64;
Set LIBPATH = C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\compiler\Lib\Intel64;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\compiler\lib\intel64_win;C:\Program Files (x86)\Windows Kits\8.1\\LIB\x64;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\LIB\amd64;C:\Program Files\Polyspace\R2019b\extern\lib\win64;;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\compiler\Lib\Intel64;C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\compiler\lib\intel64_win;C:\Program Files (x86)\Windows Kits\8.1\\LIB\x64;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\LIB\amd64;C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\LIB\amd64;C:\Program Files\Polyspace\R2019b\extern\lib\win64;;
Options file details
-------------------------------------------------------------------
Compiler location: C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows
Options file: C:\Users\zk1357\AppData\Roaming\MathWorks\MATLAB\R2019b\mex_FORTRAN_win64.xml
CMDLINE200 : link /nologo /manifest /INCREMENTAL:NO /DLL /EXPORT:MEXFUNCTION /EXPORT:MEXFILEREQUIREDAPIVERSION C:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\ero_dep_fortran.obj C:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\Module.obj C:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\prepare_bank_collapse.obj C:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\LINEAR_ELASTIC_STIFFNESS.obj C:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\FAILURE_CRITERION.obj C:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\OUTPUT.obj C:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\pardisonew.obj C:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\fortran_mexapi_version.obj "/LIBPATH:C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\mkl\lib\intel64" /LIBPATH:"C:\Program Files\Polyspace\R2019b\extern\lib\win64\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 /out:ero_dep_fortran.mexw64
CMDLINE250 : mt -outputresource:ero_dep_fortran.mexw64;2 -manifest "ero_dep_fortran.mexw64.manifest"
CMDLINE300 : del "ero_dep_fortran.exp" "ero_dep_fortran.lib" "ero_dep_fortran.mexw64.manifest" "ero_dep_fortran.ilk"
COMPILER : ifort
COMPFLAGS : /nologo /fpp /Qprec /MD /fp:source /assume:bscc -I"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\mkl\include" -I"C:\Program Files\Polyspace\R2019b\extern\include" /DMATLAB_DEFAULT_RELEASE=R2017b /DUSE_MEX_CMD /DMATLAB_MEX_FILE -Qopenmp -Qmkl /integer-size:64
COMPDEFINES : /DMATLAB_DEFAULT_RELEASE=R2017b /DUSE_MEX_CMD /DMATLAB_MEX_FILE
OPTIMFLAGS : /O2 /DNDEBUG
INCLUDE : -I"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\mkl\include" -I"C:\Program Files\Polyspace\R2019b\extern\include"
DEBUGFLAGS : /Z7
LINKER : link
LINKFLAGS : /nologo /manifest /INCREMENTAL:NO
LINKTYPE : /DLL
LINKEXPORT : /EXPORT:MEXFUNCTION
LINKEXPORTVER : /EXPORT:MEXFUNCTION /EXPORT:MEXFILEREQUIREDAPIVERSION
LINKLIBS : "/LIBPATH:C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\mkl\lib\intel64" /LIBPATH:"C:\Program Files\Polyspace\R2019b\extern\lib\win64\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:"ero_dep_fortran.mexw64.pdb"
LINKOPTIMFLAGS :
OBJEXT : .obj
LDEXT : .mexw64
SETENV : set COMPILER=ifort
set COMPFLAGS=/c /nologo /fpp /Qprec /MD /fp:source /assume:bscc -I"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\mkl\include" -I"C:\Program Files\Polyspace\R2019b\extern\include" /DMATLAB_DEFAULT_RELEASE=R2017b /DUSE_MEX_CMD /DMATLAB_MEX_FILE -Qopenmp -Qmkl /integer-size:64 /DMATLAB_DEFAULT_RELEASE=R2017b /DUSE_MEX_CMD /DMATLAB_MEX_FILE $MATLABMEX
set OPTIMFLAGS=/O2 /DNDEBUG
set DEBUGFLAGS=/Z7
set LINKER=link
set LINKFLAGS= /nologo /manifest /INCREMENTAL:NO /export:%ENTRYPOINT% /DLL "/LIBPATH:C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\mkl\lib\intel64" /LIBPATH:"C:\Program Files\Polyspace\R2019b\extern\lib\win64\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 /EXPORT:MEXFUNCTION
set LINKDEBUGFLAGS=/debug /PDB:"%OUTDIR%%MEX_NAME%.mexw64.pdb"
set NAME_OUTPUT=/out:"%OUTDIR%%MEX_NAME%%MEX_EXT%"
FORTRANROOT : C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows
VCROOT : C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC
SDKROOT : C:\Program Files (x86)\Windows Kits\8.1\
KITSROOT : C:\Program Files (x86)\Windows Kits\10\
MATLABROOT : C:\Program Files\Polyspace\R2019b
ARCH : win64
SRC : "C:\Users\zk1357\Desktop\Evolution_Code_Doubon\ero_dep_fortran.F";"C:\Users\zk1357\Desktop\Evolution_Code_Doubon\Module.F";"C:\Users\zk1357\Desktop\Evolution_Code_Doubon\prepare_bank_collapse.F";"C:\Users\zk1357\Desktop\Evolution_Code_Doubon\LINEAR_ELASTIC_STIFFNESS.F";"C:\Users\zk1357\Desktop\Evolution_Code_Doubon\FAILURE_CRITERION.F";"C:\Users\zk1357\Desktop\Evolution_Code_Doubon\OUTPUT.F";"C:\Users\zk1357\Desktop\Evolution_Code_Doubon\pardisonew.F";"C:\Program Files\Polyspace\R2019b\extern\version\fortran_mexapi_version.F"
OBJ : C:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\ero_dep_fortran.obj;C:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\Module.obj;C:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\prepare_bank_collapse.obj;C:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\LINEAR_ELASTIC_STIFFNESS.obj;C:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\FAILURE_CRITERION.obj;C:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\OUTPUT.obj;C:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\pardisonew.obj;C:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\fortran_mexapi_version.obj
OBJS : C:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\ero_dep_fortran.obj C:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\Module.obj C:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\prepare_bank_collapse.obj C:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\LINEAR_ELASTIC_STIFFNESS.obj C:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\FAILURE_CRITERION.obj C:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\OUTPUT.obj C:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\pardisonew.obj C:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\fortran_mexapi_version.obj
SRCROOT : C:\Users\zk1357\Desktop\Evolution_Code_Doubon\ero_dep_fortran
DEF : C:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\ero_dep_fortran.def
EXP : "ero_dep_fortran.exp"
LIB : "ero_dep_fortran.lib"
EXE : ero_dep_fortran.mexw64
ILK : "ero_dep_fortran.ilk"
MANIFEST : "ero_dep_fortran.mexw64.manifest"
TEMPNAME : ero_dep_fortran
EXEDIR :
EXENAME : ero_dep_fortran
OPTIM : /O2 /DNDEBUG
LINKOPTIM :
CMDLINE100_0 : ifort /c /nologo /fpp /Qprec /MD /fp:source /assume:bscc -I"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\mkl\include" -I"C:\Program Files\Polyspace\R2019b\extern\include" /DMATLAB_DEFAULT_RELEASE=R2017b /DUSE_MEX_CMD /DMATLAB_MEX_FILE -Qopenmp -Qmkl /integer-size:64 /O2 /DNDEBUG "C:\Users\zk1357\Desktop\Evolution_Code_Doubon\ero_dep_fortran.F" /FoC:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\ero_dep_fortran.obj
CMDLINE100_1 : ifort /c /nologo /fpp /Qprec /MD /fp:source /assume:bscc -I"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\mkl\include" -I"C:\Program Files\Polyspace\R2019b\extern\include" /DMATLAB_DEFAULT_RELEASE=R2017b /DUSE_MEX_CMD /DMATLAB_MEX_FILE -Qopenmp -Qmkl /integer-size:64 /O2 /DNDEBUG "C:\Users\zk1357\Desktop\Evolution_Code_Doubon\Module.F" /FoC:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\Module.obj
CMDLINE100_2 : ifort /c /nologo /fpp /Qprec /MD /fp:source /assume:bscc -I"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\mkl\include" -I"C:\Program Files\Polyspace\R2019b\extern\include" /DMATLAB_DEFAULT_RELEASE=R2017b /DUSE_MEX_CMD /DMATLAB_MEX_FILE -Qopenmp -Qmkl /integer-size:64 /O2 /DNDEBUG "C:\Users\zk1357\Desktop\Evolution_Code_Doubon\prepare_bank_collapse.F" /FoC:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\prepare_bank_collapse.obj
CMDLINE100_3 : ifort /c /nologo /fpp /Qprec /MD /fp:source /assume:bscc -I"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\mkl\include" -I"C:\Program Files\Polyspace\R2019b\extern\include" /DMATLAB_DEFAULT_RELEASE=R2017b /DUSE_MEX_CMD /DMATLAB_MEX_FILE -Qopenmp -Qmkl /integer-size:64 /O2 /DNDEBUG "C:\Users\zk1357\Desktop\Evolution_Code_Doubon\LINEAR_ELASTIC_STIFFNESS.F" /FoC:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\LINEAR_ELASTIC_STIFFNESS.obj
CMDLINE100_4 : ifort /c /nologo /fpp /Qprec /MD /fp:source /assume:bscc -I"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\mkl\include" -I"C:\Program Files\Polyspace\R2019b\extern\include" /DMATLAB_DEFAULT_RELEASE=R2017b /DUSE_MEX_CMD /DMATLAB_MEX_FILE -Qopenmp -Qmkl /integer-size:64 /O2 /DNDEBUG "C:\Users\zk1357\Desktop\Evolution_Code_Doubon\FAILURE_CRITERION.F" /FoC:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\FAILURE_CRITERION.obj
CMDLINE100_5 : ifort /c /nologo /fpp /Qprec /MD /fp:source /assume:bscc -I"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\mkl\include" -I"C:\Program Files\Polyspace\R2019b\extern\include" /DMATLAB_DEFAULT_RELEASE=R2017b /DUSE_MEX_CMD /DMATLAB_MEX_FILE -Qopenmp -Qmkl /integer-size:64 /O2 /DNDEBUG "C:\Users\zk1357\Desktop\Evolution_Code_Doubon\OUTPUT.F" /FoC:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\OUTPUT.obj
CMDLINE100_6 : ifort /c /nologo /fpp /Qprec /MD /fp:source /assume:bscc -I"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\mkl\include" -I"C:\Program Files\Polyspace\R2019b\extern\include" /DMATLAB_DEFAULT_RELEASE=R2017b /DUSE_MEX_CMD /DMATLAB_MEX_FILE -Qopenmp -Qmkl /integer-size:64 /O2 /DNDEBUG "C:\Users\zk1357\Desktop\Evolution_Code_Doubon\pardisonew.F" /FoC:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\pardisonew.obj
CMDLINE100_7 : ifort /c /nologo /fpp /Qprec /MD /fp:source /assume:bscc -I"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\mkl\include" -I"C:\Program Files\Polyspace\R2019b\extern\include" /DMATLAB_DEFAULT_RELEASE=R2017b /DUSE_MEX_CMD /DMATLAB_MEX_FILE -Qopenmp -Qmkl /integer-size:64 /O2 /DNDEBUG "C:\Program Files\Polyspace\R2019b\extern\version\fortran_mexapi_version.F" /FoC:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\fortran_mexapi_version.obj
-------------------------------------------------------------------
Building with 'Intel Parallel Studio XE 2017 for Fortran with Microsoft Visual Studio 2015'.
ifort /c /nologo /fpp /Qprec /MD /fp:source /assume:bscc -I"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\mkl\include" -I"C:\Program Files\Polyspace\R2019b\extern\include" /DMATLAB_DEFAULT_RELEASE=R2017b /DUSE_MEX_CMD /DMATLAB_MEX_FILE -Qopenmp -Qmkl /integer-size:64 /O2 /DNDEBUG "C:\Users\zk1357\Desktop\Evolution_Code_Doubon\ero_dep_fortran.F" /FoC:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\ero_dep_fortran.obj
ifort /c /nologo /fpp /Qprec /MD /fp:source /assume:bscc -I"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\mkl\include" -I"C:\Program Files\Polyspace\R2019b\extern\include" /DMATLAB_DEFAULT_RELEASE=R2017b /DUSE_MEX_CMD /DMATLAB_MEX_FILE -Qopenmp -Qmkl /integer-size:64 /O2 /DNDEBUG "C:\Users\zk1357\Desktop\Evolution_Code_Doubon\Module.F" /FoC:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\Module.obj
ifort /c /nologo /fpp /Qprec /MD /fp:source /assume:bscc -I"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\mkl\include" -I"C:\Program Files\Polyspace\R2019b\extern\include" /DMATLAB_DEFAULT_RELEASE=R2017b /DUSE_MEX_CMD /DMATLAB_MEX_FILE -Qopenmp -Qmkl /integer-size:64 /O2 /DNDEBUG "C:\Users\zk1357\Desktop\Evolution_Code_Doubon\prepare_bank_collapse.F" /FoC:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\prepare_bank_collapse.obj
ifort /c /nologo /fpp /Qprec /MD /fp:source /assume:bscc -I"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\mkl\include" -I"C:\Program Files\Polyspace\R2019b\extern\include" /DMATLAB_DEFAULT_RELEASE=R2017b /DUSE_MEX_CMD /DMATLAB_MEX_FILE -Qopenmp -Qmkl /integer-size:64 /O2 /DNDEBUG "C:\Users\zk1357\Desktop\Evolution_Code_Doubon\LINEAR_ELASTIC_STIFFNESS.F" /FoC:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\LINEAR_ELASTIC_STIFFNESS.obj
ifort /c /nologo /fpp /Qprec /MD /fp:source /assume:bscc -I"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\mkl\include" -I"C:\Program Files\Polyspace\R2019b\extern\include" /DMATLAB_DEFAULT_RELEASE=R2017b /DUSE_MEX_CMD /DMATLAB_MEX_FILE -Qopenmp -Qmkl /integer-size:64 /O2 /DNDEBUG "C:\Users\zk1357\Desktop\Evolution_Code_Doubon\FAILURE_CRITERION.F" /FoC:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\FAILURE_CRITERION.obj
ifort /c /nologo /fpp /Qprec /MD /fp:source /assume:bscc -I"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\mkl\include" -I"C:\Program Files\Polyspace\R2019b\extern\include" /DMATLAB_DEFAULT_RELEASE=R2017b /DUSE_MEX_CMD /DMATLAB_MEX_FILE -Qopenmp -Qmkl /integer-size:64 /O2 /DNDEBUG "C:\Users\zk1357\Desktop\Evolution_Code_Doubon\OUTPUT.F" /FoC:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\OUTPUT.obj
ifort /c /nologo /fpp /Qprec /MD /fp:source /assume:bscc -I"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\mkl\include" -I"C:\Program Files\Polyspace\R2019b\extern\include" /DMATLAB_DEFAULT_RELEASE=R2017b /DUSE_MEX_CMD /DMATLAB_MEX_FILE -Qopenmp -Qmkl /integer-size:64 /O2 /DNDEBUG "C:\Users\zk1357\Desktop\Evolution_Code_Doubon\pardisonew.F" /FoC:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\pardisonew.obj
ifort /c /nologo /fpp /Qprec /MD /fp:source /assume:bscc -I"C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\mkl\include" -I"C:\Program Files\Polyspace\R2019b\extern\include" /DMATLAB_DEFAULT_RELEASE=R2017b /DUSE_MEX_CMD /DMATLAB_MEX_FILE -Qopenmp -Qmkl /integer-size:64 /O2 /DNDEBUG "C:\Program Files\Polyspace\R2019b\extern\version\fortran_mexapi_version.F" /FoC:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\fortran_mexapi_version.obj
link /nologo /manifest /INCREMENTAL:NO /DLL /EXPORT:MEXFUNCTION /EXPORT:MEXFILEREQUIREDAPIVERSION C:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\ero_dep_fortran.obj C:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\Module.obj C:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\prepare_bank_collapse.obj C:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\LINEAR_ELASTIC_STIFFNESS.obj C:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\FAILURE_CRITERION.obj C:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\OUTPUT.obj C:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\pardisonew.obj C:\Users\zk1357\AppData\Local\Temp\mex_155853875819566_16652\fortran_mexapi_version.obj "/LIBPATH:C:\Program Files (x86)\IntelSWTools\compilers_and_libraries_2017.5.267\windows\mkl\lib\intel64" /LIBPATH:"C:\Program Files\Polyspace\R2019b\extern\lib\win64\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 /out:ero_dep_fortran.mexw64
Creating ero_dep_fortran.lib and ero_dep_fortran.exp
mt -outputresource:ero_dep_fortran.mexw64;2 -manifest "ero_dep_fortran.mexw64.manifest"
Microsoft (R) Manifest Tool version 6.3.9600.17336
Copyright (c) Microsoft Corporation 2012.
All rights reserved.
del "ero_dep_fortran.exp" "ero_dep_fortran.lib" "ero_dep_fortran.mexw64.manifest" "ero_dep_fortran.ilk"
MEX completed successfully.

The most probable reason is the incompatibility between the default integer size and MKL library interface version.
LP64 requires 4-byte integers, ILP64 requires 8-byte ones. mex by default adds the /integer-size:64 option, thus making integers 8-byte long. But according to the documentation, with /Qmkl option the compiler links against LP64 libraries.
To fix the problem you need to link against ILP64 libraries explicitly. To that aim remove /Qopenmp /Qmkl and use -lmkl_intel_ilp64.lib -lmkl_intel_thread.lib -lmkl_core.lib libiomp5md.lib link options.

Related

vscode cmake mvsc compiler not found [duplicate]

This question already has answers here:
CMake cannot open "ucrtd.lib"
(3 answers)
Closed 11 months ago.
I downloaded vscode with (C/C++ and cmake extentions) and Visual Studio Tools 2022. Created and QuickStart project with the cmake extention which is a simple:
#include <iostream>
int main(int, char**) {
std::cout << "Hello, world!\n";
}
cmake_minimum_required(VERSION 3.0.0)
project(hello-cmake VERSION 0.1.0)
include(CTest)
enable_testing()
add_executable(hello-cmake main.cpp)
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)
but I keep getting this error:
[variant] Loaded new set of variants
[kit] Successfully loaded 4 kits from C:\Users\Will\AppData\Local\CMakeTools\cmake-tools-kits.json
[visual-studio] Patch Windows SDK bin path from C:\Program Files (x86)\Windows Kits\10\bin\x86 to C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x86 for C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvarsall.bat
[proc] Executing command: "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" -Sc:/Users/Will/source/hello-cmake -Bc:/Users/Will/source/hello-cmake/build -G "Visual Studio 17 2022"
[main] Configuring folder: hello-cmake
[proc] Executing command: "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe" --no-warn-unused-cli -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -Sc:/Users/Will/source/hello-cmake -Bc:/Users/Will/source/hello-cmake/build -G "Visual Studio 17 2022"
[cmake] Not searching for unused variables given on the command line.
[cmake] -- Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19044.
[cmake] -- The C compiler identification is unknown
[cmake] -- The CXX compiler identification is unknown
[cmake] CMake Error at CMakeLists.txt:2 (project):
[cmake] No CMAKE_C_COMPILER could be found.
[cmake]
[cmake]
[cmake]
[cmake] CMake Error at CMakeLists.txt:2 (project):
[cmake] No CMAKE_CXX_COMPILER could be found.
[cmake]
[cmake]
[cmake]
[cmake] -- Configuring incomplete, errors occurred!
[cmake] See also "C:/Users/Will/source/hello-cmake/build/CMakeFiles/CMakeOutput.log".
[cmake] See also "C:/Users/Will/source/hello-cmake/build/CMakeFiles/CMakeError.log".
[visual-studio] Patch Windows SDK bin path from C:\Program Files (x86)\Windows Kits\10\bin\x86 to C:\Program Files (x86)\Windows Kits\10\bin\10.0.19041.0\x86 for C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvarsall.bat
this is the CMakeError
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler:
Build flags:
Id flags:
The output was:
1
Microsoft (R) Build Engine version 17.1.0+ae57d105c for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 4/1/2022 5:43:21 PM.
Project "C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdC\CompilerIdC.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "Debug\".
Creating directory "Debug\CompilerIdC.tlog\".
InitializeBuildStatus:
Creating "Debug\CompilerIdC.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.31.31103\bin\HostX64\x64\CL.exe /c /nologo /W0 /WX- /diagnostics:column /Od /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc143.pdb" /external:W0 /Gd /TC /FC /errorReport:queue CMakeCCompilerId.c
CMakeCCompilerId.c
Link:
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.31.31103\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OUT:".\CompilerIdC.exe" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\CompilerIdC.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\CompilerIdC.lib" /MACHINE:X64 Debug\CMakeCCompilerId.obj
LINK : fatal error LNK1104: cannot open file 'ucrtd.lib' [C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdC\CompilerIdC.vcxproj]
Done Building Project "C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdC\CompilerIdC.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdC\CompilerIdC.vcxproj" (default target) (1) ->
(Link target) ->
LINK : fatal error LNK1104: cannot open file 'ucrtd.lib' [C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdC\CompilerIdC.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.60
Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
Compiler:
Build flags:
Id flags:
The output was:
1
Microsoft (R) Build Engine version 17.1.0+ae57d105c for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 4/1/2022 5:43:21 PM.
Project "C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdC\CompilerIdC.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "Debug\".
Creating directory "Debug\CompilerIdC.tlog\".
InitializeBuildStatus:
Creating "Debug\CompilerIdC.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.31.31103\bin\HostX64\x64\CL.exe /c /nologo /W0 /WX- /diagnostics:column /Od /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc143.pdb" /external:W0 /Gd /TC /FC /errorReport:queue CMakeCCompilerId.c
CMakeCCompilerId.c
Link:
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.31.31103\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OUT:".\CompilerIdC.exe" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\CompilerIdC.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\CompilerIdC.lib" /MACHINE:X64 Debug\CMakeCCompilerId.obj
LINK : fatal error LNK1104: cannot open file 'ucrtd.lib' [C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdC\CompilerIdC.vcxproj]
Done Building Project "C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdC\CompilerIdC.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdC\CompilerIdC.vcxproj" (default target) (1) ->
(Link target) ->
LINK : fatal error LNK1104: cannot open file 'ucrtd.lib' [C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdC\CompilerIdC.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.43
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler:
Build flags:
Id flags:
The output was:
1
Microsoft (R) Build Engine version 17.1.0+ae57d105c for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 4/1/2022 5:43:22 PM.
Project "C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdCXX\CompilerIdCXX.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "Debug\".
Creating directory "Debug\CompilerIdCXX.tlog\".
InitializeBuildStatus:
Creating "Debug\CompilerIdCXX.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.31.31103\bin\HostX64\x64\CL.exe /c /nologo /W0 /WX- /diagnostics:column /Od /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc143.pdb" /external:W0 /Gd /TP /FC /errorReport:queue CMakeCXXCompilerId.cpp
CMakeCXXCompilerId.cpp
Link:
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.31.31103\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OUT:".\CompilerIdCXX.exe" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\CompilerIdCXX.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\CompilerIdCXX.lib" /MACHINE:X64 Debug\CMakeCXXCompilerId.obj
LINK : fatal error LNK1104: cannot open file 'ucrtd.lib' [C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdCXX\CompilerIdCXX.vcxproj]
Done Building Project "C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdCXX\CompilerIdCXX.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdCXX\CompilerIdCXX.vcxproj" (default target) (1) ->
(Link target) ->
LINK : fatal error LNK1104: cannot open file 'ucrtd.lib' [C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdCXX\CompilerIdCXX.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.44
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
Compiler:
Build flags:
Id flags:
The output was:
1
Microsoft (R) Build Engine version 17.1.0+ae57d105c for .NET Framework
Copyright (C) Microsoft Corporation. All rights reserved.
Build started 4/1/2022 5:43:23 PM.
Project "C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdCXX\CompilerIdCXX.vcxproj" on node 1 (default targets).
PrepareForBuild:
Creating directory "Debug\".
Creating directory "Debug\CompilerIdCXX.tlog\".
InitializeBuildStatus:
Creating "Debug\CompilerIdCXX.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified.
ClCompile:
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.31.31103\bin\HostX64\x64\CL.exe /c /nologo /W0 /WX- /diagnostics:column /Od /D _MBCS /Gm- /EHsc /RTC1 /MDd /GS /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /Fo"Debug\\" /Fd"Debug\vc143.pdb" /external:W0 /Gd /TP /FC /errorReport:queue CMakeCXXCompilerId.cpp
CMakeCXXCompilerId.cpp
Link:
C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.31.31103\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OUT:".\CompilerIdCXX.exe" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:".\CompilerIdCXX.pdb" /SUBSYSTEM:CONSOLE /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:".\CompilerIdCXX.lib" /MACHINE:X64 Debug\CMakeCXXCompilerId.obj
LINK : fatal error LNK1104: cannot open file 'ucrtd.lib' [C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdCXX\CompilerIdCXX.vcxproj]
Done Building Project "C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdCXX\CompilerIdCXX.vcxproj" (default targets) -- FAILED.
Build FAILED.
"C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdCXX\CompilerIdCXX.vcxproj" (default target) (1) ->
(Link target) ->
LINK : fatal error LNK1104: cannot open file 'ucrtd.lib' [C:\Users\Will\source\hello-cmake\build\CMakeFiles\3.22.22022201-MSVC_2\CompilerIdCXX\CompilerIdCXX.vcxproj]
0 Warning(s)
1 Error(s)
Time Elapsed 00:00:00.44
This is actually the answer.
https://stackoverflow.com/a/71418520/6656422
10.0.19041.0is a bad windows sdk version. I installed 10.0.20348.0 and it works no problem.

MS C++ 2012 linker hangs but only in debug mode x64

I just upgraded to MSVC 2012 Express (which is saying trial btw. I wonder why as it should be free). After lots of changes from MSVC 2005 it started working, but the linker hangs, but only in debug mode x64, in all other 3 modes it works! Here are the commandline arguments (I called it from a script, but it does the same thing when called from IDE).
cl.exe /fp:precise /Od /MTd /bigobj /RTCscu /Zi /GS- /TP /Fd"!temp/DebugDebug1/MRotary/vc70.pdb" /D_USRDLL /D_WINDLL /D_WINDOWS
/DWIN64 /Fo"!temp/DebugDebug1/MRotary/main.obj"
/FR"!temp/DebugDebug1/MRotary/" /I "C:/Program Files (x86)/Microsoft
Visual Studio 11.0/Vc/include" /I "C:/Program Files (x86)/Windows
Kits/8.0/Include/um" /I "C:/Program Files (x86)/Windows
Kits/8.0/Include/shared" /I "C:/Program Files
(x86)/Intel/IPP/6.1.2.041/em64t/include" /D_MBCS /c /W3 /EHsc /GF /Gd
/Zc:wchar_t /Zc:forScope /nologo MDrummer/VSTEffects/main.cpp
link.exe !temp/DebugDebug1/MRotary/icon.res !temp/DebugDebug1/MRotary/main.obj
!temp/DebugDebug1/MRotary/resourcesrotary.obj
!temp/DebugDebug1/MRotary/mlibrary.obj mlibraryasm_x64_debug.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 comctl32.lib wsock32.lib winmm.lib msimg32.lib psapi.lib
opengl32.lib Glu32.lib freetype_x64_debug.lib zlib_x64_debug.lib
libpng_x64_debug.lib libtiff_x64_debug.lib libjpeg_x64_debug.lib
giflib_x64_debug.lib bzip2_x64_debug.lib libflac_x64_debug.lib
vstsdk3_x64_debug.lib ippcoreem64tl.lib ippsemergedem64t.lib
ippsmergedem64t.lib ippiemergedem64t.lib ippimergedem64t.lib
ippvmemergedem64t.lib ippvmmergedem64t.lib /OUT:"c:/program
files/vstplugins/MeldaProductionx64/Modulation/MRotary.dll"
/INCREMENTAL:NO /DEBUG /MACHINE:X64 /SUBSYSTEM:WINDOWS
/DEF:"D:/Programming/Mlibrary/mvstplugin.def" /DLL
/IMPLIB:"D:/Programming/MDrummer/!temp/DebugDebug1/MRotary.lib"
/PDB:"c:/program
files/vstplugins/MeldaProductionx64/Modulation/MRotary.pdb"
/LIBPATH:"D:/Programming/Mlibrary/library"
/LIBPATH:"D:/Programming/MDrummer"
/LIBPATH:"D:/Programming/MDrummer/!temp/DebugDebug1"
/LIBPATH:"D:/Programming/MDrummer/c:\program
files\vstplugins\MeldaProductionx64" /LIBPATH:"C:/Program Files
(x86)/Microsoft Visual Studio 11.0/Vc/lib/amd64" /LIBPATH:"C:/Program
Files (x86)/Windows Kits/8.0/Lib/win8/um/x64" /LIBPATH:"C:/Program
Files (x86)/Intel/IPP/6.1.2.041/em64t/lib" /LIBPATH:"C:/Program Files
(x86)/Intel/IPP/6.1.2.041/em64t/stublib" /OPT:REF /OPT:ICF /nologo
/MANIFEST:NO
Any ideas? I searched there have been troubles with this, but nothing seems related to this specific one.
Ok so apparently it starts working if I remove "/OPT:REF /OPT:ICF", but why and why only in such specific circumstances, that's a question...

Running Simulink Model that generates C/C++ code for compilation

While I am trying to run a simulink model the following error is encountered in relation with compilation and linking of C/C++ code
C:\Comms\slprj\_sfprj\quantizer_sim\_self\sfun\src>call "mexopts.bat"
Microsoft (R) Program Maintenance Utility Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
### Compiling "quantizer_sim_sfun.c"
cl.exe /c /Zp8 /GR /W3 /EHs /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /nologo /MD /c /Zp8 /GR /W3 /EHs /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /nologo /MD /I "C:\Program Files\MATLAB\R2012b\extern\include" /I "C:\Program Files\MATLAB\R2012b\simulink\include" /I "C:\Program Files\MATLAB\R2012b\stateflow\c\mex\include" /I "C:\Program Files\MATLAB\R2012b\stateflow\c\debugger\include" "quantizer_sim_sfun.c"
quantizer_sim_sfun.c
### Compiling "quantizer_sim_sfun_registry.c"
cl.exe /c /Zp8 /GR /W3 /EHs /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /nologo /MD /c /Zp8 /GR /W3 /EHs /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /nologo /MD /I "C:\Program Files\MATLAB\R2012b\extern\include" /I "C:\Program Files\MATLAB\R2012b\simulink\include" /I "C:\Program Files\MATLAB\R2012b\stateflow\c\mex\include" /I "C:\Program Files\MATLAB\R2012b\stateflow\c\debugger\include" "quantizer_sim_sfun_registry.c"
quantizer_sim_sfun_registry.c
### Compiling "c1_quantizer_sim.c"
cl.exe /c /Zp8 /GR /W3 /EHs /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /nologo /MD /c /Zp8 /GR /W3 /EHs /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /nologo /MD /I "C:\Program Files\MATLAB\R2012b\extern\include" /I "C:\Program Files\MATLAB\R2012b\simulink\include" /I "C:\Program Files\MATLAB\R2012b\stateflow\c\mex\include" /I "C:\Program Files\MATLAB\R2012b\stateflow\c\debugger\include" "c1_quantizer_sim.c"
c1_quantizer_sim.c
### Compiling "c2_quantizer_sim.c"
cl.exe /c /Zp8 /GR /W3 /EHs /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /nologo /MD /c /Zp8 /GR /W3 /EHs /D_CRT_SECURE_NO_DEPRECATE /D_SCL_SECURE_NO_DEPRECATE /D_SECURE_SCL=0 /DMATLAB_MEX_FILE /nologo /MD /I "C:\Program Files\MATLAB\R2012b\extern\include" /I "C:\Program Files\MATLAB\R2012b\simulink\include" /I "C:\Program Files\MATLAB\R2012b\stateflow\c\mex\include" /I "C:\Program Files\MATLAB\R2012b\stateflow\c\debugger\include" "c2_quantizer_sim.c"
c2_quantizer_sim.c
### Linking ...
link.exe /nologo /dll /OPT:NOREF /export:mexFunction /OUT:quantizer_sim_sfun.mexw64 /map:"quantizer_sim_sfun.map" "C:\Program Files\MATLAB\R2012b\stateflow\c\mex\lib\win64\sfc_mex.lib" "C:\Program Files\MATLAB\R2012b\stateflow\c\debugger\lib\win64\sfc_debug.lib" "C:\Program Files\MATLAB\R2012b\extern\lib\win64\microsoft\libmx.lib" "C:\Program Files\MATLAB\R2012b\extern\lib\win64\microsoft\libmex.lib" "C:\Program Files\MATLAB\R2012b\extern\lib\win64\microsoft\libmat.lib" "C:\Program Files\MATLAB\R2012b\extern\lib\win64\microsoft\libfixedpoint.lib" "C:\Program Files\MATLAB\R2012b\extern\lib\win64\microsoft\libut.lib" "C:\Program Files\MATLAB\R2012b\extern\lib\win64\microsoft\libmwmathutil.lib" "C:\Program Files\MATLAB\R2012b\extern\lib\win64\microsoft\libemlrt.lib" "C:\Program Files\MATLAB\R2012b\lib\win64\libippmwipt.lib" "C:\Program Files\MATLAB\R2012b\extern\lib\win64\microsoft\libmwblascompat32.lib" #quantizer_sim_sfun.mol
LINK : fatal error LNK1104: cannot open file 'MSVCRT.lib'
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin\link.exe"' : return code '0x450'
Stop.
Error using quantizer_script (line 24)
Error using targetman>throw_make_error (line 588)
(SLSF Diagnostic)
Currently Matlab is configured with Visual Studio 2010 Compiler. In Addition I checked that the LIBPATH is correctly set from Matlab. I am also running Matlab with administator's permissions.
How can the LINK and NMAKE errors be solved?
Visual Studio Express editions are no longer supported.
When you run mex -setup choose the SDK 7.1 (download here, select x64 compilers during installation).
Also be sure you install the .NET Framework 4.0 runtime.
Big however: With the SDK, there is a bug, where compilers get removed (details from MS)! Check it out here too. The patch is on Microsoft's website.
See this support article for tips on how to download and configure the SDK for MATLAB. Maybe confirm that the compilers were selected in the installation.

Error building Boost 1.50 with bjam on MSVC 2010

Building Boost 1.50 with bjam on MSVC 2010
I'm trying to build the latest Boost (1.50) using MSVC 2010. I have MSVC 2003 and 2008 installed on the same machine (Windows Vista), and have successfully been able to build Boost 1.50 using both toolsets. However I'm having trouble with msvc 2010.
The following is the bjam command I use after having called bootstap.bat:
bjam --without-mpi --without-python --toolset=msvc-7.1 --build-type=complete -d+2
bjam --without-mpi --without-python --toolset=msvc-9.0 --build-type=complete -d+2
bjam --without-mpi --without-python --toolset=msvc-10.0 --build-type=complete -d+2
When building MSVC 2010, I get the following error messages:
file bin.v2\libs\exception\build\msvc-10.0\release\link-static\runtime-link-static\clone_current_exception_non_intrusive.obj.rsp
"libs\exception\src\clone_current_exception_non_intrusive.cpp" -Fo"bin.v2\libs\exception\build\msvc-10.0\release\link-static\runtime-link-static\clone_current_exception_non_intrusi
ve.obj" -TP /O2 /Ob2 /W3 /GR /Zc:forScope /Zc:wchar_t /MT /wd4675 /EHs -c
-DBOOST_ALL_NO_LIB=1
-DNDEBUG
"-I."
compile-c-c++ bin.v2\libs\exception\build\msvc-10.0\release\link-static\runtime-link-static\clone_current_exception_non_intrusive.obj
call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 >nul
cl /Zm800 -nologo #"bin.v2\libs\exception\build\msvc-10.0\release\link-static\runtime-link-static\clone_current_exception_non_intrusive.obj.rsp"
Command line error D2016 : '/Ze' and '/Za' command-line options are incompatible
...skipped <pbin.v2\libs\exception\build\msvc-10.0\release\link-static\runtime-link-static>libboost_exception-vc100-s-1_50.lib for lack of <pbin.v2\libs\exception\build\msvc-10.0\r
elease\link-static\runtime-link-static>clone_current_exception_non_intrusive.obj...
...skipped <pstage\lib>libboost_exception-vc100-s-1_50.lib for lack of <pbin.v2\libs\exception\build\msvc-10.0\release\link-static\runtime-link-static>libboost_exception-vc100-s-1_
50.lib...
file bin.v2\libs\filesystem\build\msvc-10.0\release\link-static\runtime-link-static\codecvt_error_category.obj.rsp
"libs\filesystem\src\codecvt_error_category.cpp" -Fo"bin.v2\libs\filesystem\build\msvc-10.0\release\link-static\runtime-link-static\codecvt_error_category.obj" -TP /O2 /Ob2 /W3
/GR /Zc:forScope /Zc:wchar_t /MT /wd4675 /EHs -c
-DBOOST_ALL_NO_LIB=1
-DBOOST_FILESYSTEM_STATIC_LINK=1
-DBOOST_SYSTEM_STATIC_LINK=1
-DNDEBUG
"-I."
compile-c-c++ bin.v2\libs\filesystem\build\msvc-10.0\release\link-static\runtime-link-static\codecvt_error_category.obj
call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 >nul
cl /Zm800 -nologo #"bin.v2\libs\filesystem\build\msvc-10.0\release\link-static\runtime-link-static\codecvt_error_category.obj.rsp"
Command line error D2016 : '/Ze' and '/Za' command-line options are incompatible
file bin.v2\libs\filesystem\build\msvc-10.0\release\link-static\runtime-link-static\operations.obj.rsp
"libs\filesystem\src\operations.cpp" -Fo"bin.v2\libs\filesystem\build\msvc-10.0\release\link-static\runtime-link-static\operations.obj" -TP /O2 /Ob2 /W3 /GR /Zc:forScope /Zc:wch
ar_t /MT /wd4675 /EHs -c
-DBOOST_ALL_NO_LIB=1
-DBOOST_FILESYSTEM_STATIC_LINK=1
-DBOOST_SYSTEM_STATIC_LINK=1
-DNDEBUG
"-I."
compile-c-c++ bin.v2\libs\filesystem\build\msvc-10.0\release\link-static\runtime-link-static\operations.obj
call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 >nul
cl /Zm800 -nologo #"bin.v2\libs\filesystem\build\msvc-10.0\release\link-static\runtime-link-static\operations.obj.rsp"
Command line error D2016 : '/Ze' and '/Za' command-line options are incompatible
file bin.v2\libs\filesystem\build\msvc-10.0\release\link-static\runtime-link-static\path.obj.rsp
"libs\filesystem\src\path.cpp" -Fo"bin.v2\libs\filesystem\build\msvc-10.0\release\link-static\runtime-link-static\path.obj" -TP /O2 /Ob2 /W3 /GR /Zc:forScope /Zc:wchar_t /MT /wd
4675 /EHs -c
-DBOOST_ALL_NO_LIB=1
-DBOOST_FILESYSTEM_STATIC_LINK=1
-DBOOST_SYSTEM_STATIC_LINK=1
-DNDEBUG
"-I."
compile-c-c++ bin.v2\libs\filesystem\build\msvc-10.0\release\link-static\runtime-link-static\path.obj
call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 >nul
cl /Zm800 -nologo #"bin.v2\libs\filesystem\build\msvc-10.0\release\link-static\runtime-link-static\path.obj.rsp"
Command line error D2016 : '/Ze' and '/Za' command-line options are incompatible
I have very little experience with bjam other than executing the command lines described above. I believe everything is setup correctly, all the compilers are on the PATH environment variable. eg:
C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\bin
Furthermore I can't see where in the bjam configs for msvc that the '/Ze' and '/Za' are defined.
Is there something else I'm missing?
Instead of adding the compiler to the path, have you tried launching bjam from Visual Studio Command Prompt (found on your Start Menu)?
I never put anything on PATH - I just run that, go to boost folder, bootstrap and build.

DialogBlocks on Windows: MSVCR80D.dll is missing

I build wxWidgets application with DialogBlocks on Windows 7 with VS2005 installed. Build is successful, but executable doesn't run giving the message: "The program can't start because MSVCR80D.dll is missing from your computer". The same code built in Visual Studio is OK. Build log:
----------------------- Configuration: VC++ Debug -----------------------
In directory: C:\Users\alexm\Documents\DialogBlocks Projects\Test1
nmake /nologo -f makefile.vc CONFIG=debug clean all
if exist VCDebug\*.obj del VCDebug\*.obj
if exist VCDebug\*.res del VCDebug\*.res
if exist VCDebug\Test11.exe del VCDebug\Test11.exe
if exist VCDebug\Test11.ilk del VCDebug\Test11.ilk
if exist VCDebug\Test11.pdb del VCDebug\Test11.pdb
cl.exe /c /nologo /TP /FoVCDebug\mainframe.obj /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D__WXDEBUG__ /D_DEBUG /Zi /MDd /Od /GR /EHsc /W4 /I"C:\wxWidgets-2.8.10/include" /I"C:\wxWidgets-2.8.10/contrib/include" /I"C:\wxWidgets-2.8.10/lib/vc_lib/mswd" /I"C:\Program Files (x86)\Microsoft Visual Studio 8\vc\include" /I"C:\Program Files (x86)\Microsoft Visual Studio 8\vc\PlatformSDK\include" mainframe.cpp
mainframe.cpp
cl.exe /c /nologo /TP /FoVCDebug\test11app.obj /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D__WXDEBUG__ /D_DEBUG /Zi /MDd /Od /GR /EHsc /W4 /I"C:\wxWidgets-2.8.10/include" /I"C:\wxWidgets-2.8.10/contrib/include" /I"C:\wxWidgets-2.8.10/lib/vc_lib/mswd" /I"C:\Program Files (x86)\Microsoft Visual Studio 8\vc\include" /I"C:\Program Files (x86)\Microsoft Visual Studio 8\vc\PlatformSDK\include" test11app.cpp
test11app.cpp
rc.exe /foVCDebug\Test11.res /DNOPCH /DWIN32 /D__WXMSW__ /D_WINDOWS /D__WXDEBUG__ /D_DEBUG /I "C:\wxWidgets-2.8.10/include" /I "C:\wxWidgets-2.8.10/contrib/include" /I "C:\wxWidgets-2.8.10/lib/vc_lib/mswd" /I "C:\Program Files (x86)\Microsoft Visual Studio 8\vc\include" /I "C:\Program Files (x86)\Microsoft Visual Studio 8\vc\PlatformSDK\include" Test11.rc
link.exe /OUT:VCDebug\Test11.exe /LIBPATH:"C:\wxWidgets-2.8.10/lib/vc_lib" /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 8\vc\lib" /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 8\vc\PlatformSDK\lib" /nologo /SUBSYSTEM:WINDOWS /machine:i386 /DEBUG VCDebug\mainframe.obj VCDebug\test11app.obj VCDebug\Test11.res wxmsw28d_richtext.lib wxmsw28d_aui.lib wxmsw28d_html.lib wxmsw28d_xrc.lib wxmsw28d_core.lib wxbase28d.lib wxtiffd.lib wxjpegd.lib wxpngd.lib wxzlibd.lib wxregexd.lib wxmsw28d_adv.lib wxmsw28d_html.lib wxmsw28d_xrc.lib wxbase28d_net.lib wxbase28d_xml.lib wxexpatd.lib kernel32.lib user32.lib gdi32.lib comdlg32.lib winspool.lib winmm.lib shell32.lib comctl32.lib ole32.lib oleaut32.lib uuid.lib rpcrt4.lib advapi32.lib wsock32.lib
link.exe /OUT:VCDebug\Test11.exe /LIBPATH:"C:\wxWidgets-2.8.10/lib/vc_lib" /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 8\vc\lib" /LIBPATH:"C:\Program Files (x86)\Microsoft Visual Studio 8\vc\PlatformSDK\lib" /nologo /SUBSYSTEM:WINDOWS /machine:i386 /DEBUG #C:\Users\alexm\AppData\Local\Temp\nmB05C.tmp
Done.
0 errors, 0 warnings
Manifest file:
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
<dependency>
<dependentAssembly>
<assemblyIdentity type='win32' name='Microsoft.VC80.DebugCRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*' />
</dependentAssembly>
</dependency>
<dependency>
<dependentAssembly>
<assemblyIdentity type='win32' name='Microsoft.VC80.CRT' version='8.0.50727.762' processorArchitecture='x86' publicKeyToken='1fc8b3b9a1e18e3b' />
</dependentAssembly>
</dependency>
</assembly>
Can I change some compiler/linker flags, or make some change on my computer, to allow this executable to run?
The case is that compiler cl.exe have been provided with /MDd flag that tells him to link against shared library versions. Try /MTd instead.
The problem might have been arisen because of wxWidgets libraries if they were built with shared runtime. Usually you are not permitted to build projects with different versions of vc runtime. In that case you could explore whether wxWidgets provides libs built with static runtime or not. Often they do.
Just to be clear. You are not permitted to link binaries against libraries and objects files if they were compiled involving different versions of vc runtime. On my machine i've got MSVS 2005 but i've got slightly different version of CRT debug runtime.
<assemblyIdentity type="win32" name="Microsoft.VC80.DebugCRT" version="8.0.50608.0" processorArchitecture="x86" publicKeyToken="1fc8b3b9a1e18e3b" />
One possible reason is that you either on the other hand library authors have had MSVS 2005 SP1 installed.
HTH.