Why do I receive a DLLRegisterServer error when using the MBUILD command from the MATLAB Compiler?

4 views (last 30 days)
I am attempting to use the MBUILD command to select my C or Fortran compiler. However, after I select and confirm my selection, I receive the following error:
ERROR: --> ""C:\MATLAB71\bin\win32\mwregsvr"
"C:\MATLAB71\bin\win32\mwcomutil.dll""
Error: DllRegisterServer in
"C:\MATLAB71\bin\win32\mwcomutil.dll" failed
Undefined subroutine &mexsetup::expire called at
C:\MATLAB71\/bin\mexsetup.pm line 752.
??? Error using ==> mbuild
Unable to complete successfully

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 19 May 2021
Edited: MathWorks Support Team on 19 May 2021
This error generally indicates that the current user does not have sufficient permissions to modify the registry. The MBUILD command uses the MWREGSVR command to register two COM components with Windows.
To verify that the issue is permissions, open a DOS window and enter the following commands for releases prior to MATLAB R2009b:
cd $MATLABROOT$\bin\$ARCH$
regsvr32 mwcomutil.dll
For releases beginning with MATLAB R2009b:
cd $MATLABROOT$\runtime\$ARCH$
regsvr32 mwcomutil.dll
Where $MATLABROOT$ is the MATLAB root directory and can be found by typing MATLABROOT at the MATLAB command prompt. $ARCH$ is the computer's architecture, and is either WIN32 or WIN64.
If this command returns an error similar to the following:
ERROR: DllRegisterServer in mwcomutil.dll failed.
Return code was: 0x80070005
this will confirm that the cause of the MBUILD failure is insufficient permissions. For more information on regsvr32 permission requirements, refer to the following Microsoft reference URL:
NOTE: If you are encountering this issue on Microsoft Windows Vista, please ensure that you are running MATLAB as Administrator. To start MATLAB as Administrator, right-click on the MATLAB icon and select 'Administrator'.

More Answers (0)

Categories

Find more on MATLAB Compiler in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!