Building a .NET Component project with MATLAB 7.3 in windows 7

I want to build a .NET Component project with MATLAB 7.3 in Windows 7. The problem is that when I build the project I get the following error:
Your project cannot be built because you have not specified a compiler. To do so run the following command in MATLAB: mbuild -setup
when i write the mbuild -setup command, it displays the choices to select from the installed compilers. when I am done after specifying the choice it displays the following error:
Error: DllRegisterServer in C:\PROGRA~2\MATLAB\R2006b\bin\win32\mwcomutil.dll failed Undefined subroutine &mexsetup::expire called at C:\PROGRA~2\MATLAB\R2006b\bin\/mexsetup.pm line 819. ??? Error using ==> mbuild Unable to complete successfully
Can any one resolve this error? Thanks.

Answers (1)

Possibly the following solution may help: here
But more relevant is probably this other one

5 Comments

As the second link suggests, you need to run MATLAB as Administrator for mbuild to run successfully.
Though in this way the project was build successfuly and did not gave this error:
Error: DllRegisterServer in C:\PROGRA~2\MATLAB\R2006b\bin\win32\mwcomutil.dll failed Undefined subroutine &mexsetup::expire called at C:\PROGRA~2\MATLAB\R2006b\bin\/mexsetup.pm line 819. ??? Error using ==> mbuild Unable to complete successfully
instead this message comes:
--> "C:\PROGRA~2\MATLAB\R2006b\bin\win32\mwregsvr C:\PROGRA~2\MATLAB\R2006b\bin\win32\mwcomutil.dll"
DllRegisterServer in C:\PROGRA~2\MATLAB\R2006b\bin\win32\mwcomutil.dll succeeded
--> "C:\PROGRA~2\MATLAB\R2006b\bin\win32\mwregsvr C:\PROGRA~2\MATLAB\R2006b\bin\win32\mwcommgr.dll"
DllRegisterServer in C:\PROGRA~2\MATLAB\R2006b\bin\win32\mwcommgr.dll succeeded
But my problem is still there. I need the dll file for my project to be used in c#.net. This is not creating any sort of file after building the project.
I am following this method:
http://www.ehow.com/how_4937250_use-matlab-method-net.html
for which I need to get Test.dll
Can any one help in this regard?
I would recommend following instructions from the official documentation: http://www.mathworks.com/help/toolbox/dotnetbuilder/ug/brw2nmx.html#brxstoy-1
If Test.dll is still not created, could you paste the build log so we can look for any errors.
Also, one quick tip: start MATLAB as a regular user (not Admin) to build your component. I've notice some problems with running as Admin - it appears that user-specific folders are not given access to the admin. So perhaps you tried to compile on the session of MATLAB that you run as admin, and Windows is not giving MATLAB permission to write to disk?
I have followed these instructions as well but still my problem is not solved.
when i add the class and .m file i that class, the build command is deactivated.
can you people figure out the problem? or suggest any othr solution? thanks in advance
Bushra: It's not clear what is going wrong here. I would recommend contacting Tech Support so they can walk you through the process.

Sign in to comment.

Categories

Asked:

on 22 Jun 2011

Community Treasure Hunt

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

Start Hunting!