mex can’t find Visual Studio 2022 C++ when running clibgen.generateLibraryDefinition
>> internal.cxxfe.util.getMexCompilerInfo
‘C:Program’ is not recognized as an internal or external command,
operable program or batch file.
‘cl’ is not recognized as an internal or external command,
operable program or batch file.
I have reinstalled VS 2022 to a path that isn’t even in C:Program Files. Rerun mex -setup C++. Over the last week, this was working for other DLL’s, but I had to recompile a DLL written for VS 2013 which Matlab doesn’t support and went from 32 bit to 64 bit because the libary version of QT had to change from 5.7 to 6.7 to support VS 2022 instead of VS 2013. So now the DLL is now x64 compiled in VS 2022 with QT 6.7 using Matlab R2023b 64 bit.>> internal.cxxfe.util.getMexCompilerInfo
‘C:Program’ is not recognized as an internal or external command,
operable program or batch file.
‘cl’ is not recognized as an internal or external command,
operable program or batch file.
I have reinstalled VS 2022 to a path that isn’t even in C:Program Files. Rerun mex -setup C++. Over the last week, this was working for other DLL’s, but I had to recompile a DLL written for VS 2013 which Matlab doesn’t support and went from 32 bit to 64 bit because the libary version of QT had to change from 5.7 to 6.7 to support VS 2022 instead of VS 2013. So now the DLL is now x64 compiled in VS 2022 with QT 6.7 using Matlab R2023b 64 bit. >> internal.cxxfe.util.getMexCompilerInfo
‘C:Program’ is not recognized as an internal or external command,
operable program or batch file.
‘cl’ is not recognized as an internal or external command,
operable program or batch file.
I have reinstalled VS 2022 to a path that isn’t even in C:Program Files. Rerun mex -setup C++. Over the last week, this was working for other DLL’s, but I had to recompile a DLL written for VS 2013 which Matlab doesn’t support and went from 32 bit to 64 bit because the libary version of QT had to change from 5.7 to 6.7 to support VS 2022 instead of VS 2013. So now the DLL is now x64 compiled in VS 2022 with QT 6.7 using Matlab R2023b 64 bit. mex, mex compiler MATLAB Answers — New Questions