Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
mex -setup error

Subject: mex -setup error

From: Ajay

Date: 20 Feb, 2009 17:12:02

Message: 1 of 5

Hi,

I am trying to setup mex on my machine, and I get the following error:



>> mex -setup
The system cannot find the path specified.
Please choose your compiler for building external interface (MEX) files:
 
Would you like mex to locate installed compilers [y]/n? y
 
Select a compiler:
[1] Lcc C version 2.4.1 in C:\PROGRA~1\MATLAB\R2006b\sys\lcc
[2] Microsoft Visual C/C++ version 7.1 in C:\Program Files\Microsoft Visual Studio .NET 2003
[3] Microsoft Visual C/C++ version 6.0 in C:\Program Files\Microsoft Visual Studio
[4] Open WATCOM C/C++ version 1.3 in C:\watcom-1.3
 
[0] None
 
Compiler: 2
 
Please verify your choices:
 
Compiler: Microsoft Visual C/C++ 7.1
Location: C:\Program Files\Microsoft Visual Studio .NET 2003
 
Are these correct?([y]/n): y
 
Trying to update options file: C:\Documents and Settings\Ajay\Application Data\MathWorks\MATLAB\R2006b\mexopts.bat
From template: C:\PROGRA~1\MATLAB\R2006b\bin\win32\mexopts\msvc71opts.bat
 
Done . . .
 
??? Error using ==> mex
Unable to complete successfully.


Anyone knows what could be the problem?

Thanks,
Ajay

Subject: mex -setup error

From: Roland Neumann

Date: 23 Feb, 2009 13:12:01

Message: 2 of 5

Matlab uses a complete -bat-File to adjust pathes and options of the compiler. All of the possible files are in one folder. It looks like one of these preset pathes or options may wrong. I would suggest to check each bat-line if they all locate to valid files.

Subject: mex -setup error

From: Ajay

Date: 25 Feb, 2009 16:34:01

Message: 3 of 5

Hi Roland,

I tried checking the bat file ( under "C:\Documents and Settings\Ajay\Application Data\MathWorks\MATLAB\R2006b"). If I try to open it (right click -> edit) I get a message "The filename, directory name, or volume label syntax is incorrect". And I just found out I cannot open any .bat file on my machine, it gives me the same error (as far as I remember it was not the case before). I have also tried uninstalling the matlab and do a fresh install, so must be something else that is messing up the .bat files. Thanks for your suggestion.

Ajay

Subject: mex -setup error

From: Sangeetha Nair

Date: 31 Mar, 2009 18:03:01

Message: 4 of 5

Dear Ajay
 I too have a similar problem.I understand that after writing a C mex S function, only if we compile with the mex command will simulink identify the file,is it not? When i tried to enter the Sfunction name in the s function block of simulink and attempted simulation, the error that the such a file does not exist popped up.
I too tried to give the 'mex filename' command at the matlab command line to generate the executable...and am getting the same error as yours

"C:\MATLAB701\BIN\WIN32\MEX.PL: Error: 'filename.c' not found.
???Error using ==> mex
> Unable to complete successfully."

if u have been able to solve your problem by now, could you please help me.

Thank You
Sangeetha


"Ajay" <ajaysonar@gmail.com> wrote in message <gnmo92$l3a$1@fred.mathworks.com>...
> Hi,
>
> I am trying to setup mex on my machine, and I get the following error:
>
>
>
> >> mex -setup
> The system cannot find the path specified.
> Please choose your compiler for building external interface (MEX) files:
>
> Would you like mex to locate installed compilers [y]/n? y
>
> Select a compiler:
> [1] Lcc C version 2.4.1 in C:\PROGRA~1\MATLAB\R2006b\sys\lcc
> [2] Microsoft Visual C/C++ version 7.1 in C:\Program Files\Microsoft Visual Studio .NET 2003
> [3] Microsoft Visual C/C++ version 6.0 in C:\Program Files\Microsoft Visual Studio
> [4] Open WATCOM C/C++ version 1.3 in C:\watcom-1.3
>
> [0] None
>
> Compiler: 2
>
> Please verify your choices:
>
> Compiler: Microsoft Visual C/C++ 7.1
> Location: C:\Program Files\Microsoft Visual Studio .NET 2003
>
> Are these correct?([y]/n): y
>
> Trying to update options file: C:\Documents and Settings\Ajay\Application Data\MathWorks\MATLAB\R2006b\mexopts.bat
> From template: C:\PROGRA~1\MATLAB\R2006b\bin\win32\mexopts\msvc71opts.bat
>
> Done . . .
>
> ??? Error using ==> mex
> Unable to complete successfully.
>
>
> Anyone knows what could be the problem?
>
> Thanks,
> Ajay

Subject: mex -setup error

From: Nagaraju boya

Date: 1 Apr, 2009 07:29:01

Message: 5 of 5

hi,

Is it working with this compiler option
3. Microsoft Visual C/C++ version 6.0 in C:\Program Files\Microsoft Visual Studio

regards,
Naga.


"Sangeetha Nair" <sangeethagr85@gmail.com> wrote in message <gqtlsl$6t0$1@fred.mathworks.com>...
> Dear Ajay
> I too have a similar problem.I understand that after writing a C mex S function, only if we compile with the mex command will simulink identify the file,is it not? When i tried to enter the Sfunction name in the s function block of simulink and attempted simulation, the error that the such a file does not exist popped up.
> I too tried to give the 'mex filename' command at the matlab command line to generate the executable...and am getting the same error as yours
>
> "C:\MATLAB701\BIN\WIN32\MEX.PL: Error: 'filename.c' not found.
> ???Error using ==> mex
> > Unable to complete successfully."
>
> if u have been able to solve your problem by now, could you please help me.
>
> Thank You
> Sangeetha
>
>
> "Ajay" <ajaysonar@gmail.com> wrote in message <gnmo92$l3a$1@fred.mathworks.com>...
> > Hi,
> >
> > I am trying to setup mex on my machine, and I get the following error:
> >
> >
> >
> > >> mex -setup
> > The system cannot find the path specified.
> > Please choose your compiler for building external interface (MEX) files:
> >
> > Would you like mex to locate installed compilers [y]/n? y
> >
> > Select a compiler:
> > [1] Lcc C version 2.4.1 in C:\PROGRA~1\MATLAB\R2006b\sys\lcc
> > [2] Microsoft Visual C/C++ version 7.1 in C:\Program Files\Microsoft Visual Studio .NET 2003
> > [3] Microsoft Visual C/C++ version 6.0 in C:\Program Files\Microsoft Visual Studio
> > [4] Open WATCOM C/C++ version 1.3 in C:\watcom-1.3
> >
> > [0] None
> >
> > Compiler: 2
> >
> > Please verify your choices:
> >
> > Compiler: Microsoft Visual C/C++ 7.1
> > Location: C:\Program Files\Microsoft Visual Studio .NET 2003
> >
> > Are these correct?([y]/n): y
> >
> > Trying to update options file: C:\Documents and Settings\Ajay\Application Data\MathWorks\MATLAB\R2006b\mexopts.bat
> > From template: C:\PROGRA~1\MATLAB\R2006b\bin\win32\mexopts\msvc71opts.bat
> >
> > Done . . .
> >
> > ??? Error using ==> mex
> > Unable to complete successfully.
> >
> >
> > Anyone knows what could be the problem?
> >
> > Thanks,
> > Ajay

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us