Windows 7, MATLAB installation didn't come with compiler

  • Follow


Hello,

I just upgraded to Windows 7 and my MATLAB installation didn't come with a compiler.  When I go to 'mex -setup', no compilers are listed.

Why is this?  And what do I have to do to get a compiler?  I've always used the one that came with MATLAB.

Regards,
Horace
0
Reply Horace 12/20/2010 12:48:05 PM

"Horace Lai" <horacelai@gmail.com> wrote in message <ienja5$go3$1@fred.mathworks.com>...
> Hello,
> 
> I just upgraded to Windows 7 and my MATLAB installation didn't come with a compiler.  When I go to 'mex -setup', no compilers are listed.
> 
> Why is this?  And what do I have to do to get a compiler?  I've always used the one that came with MATLAB.
> 
> Regards,
> Horace

Presumably you're using 64-bit MATLAB. "On 32-bit Windows, the lcc C compiler is installed along with MATLAB, providing out-of-the-box support for most MathWorks products. Further options are available as outlined in this table."

Supported compilers for 64-bit MATLAB on Windows (including some free ones) are listed here: http://www.mathworks.com/support/compilers/R2010b/win64.html#matlab
0
Reply Mark 12/20/2010 1:01:11 PM


"Horace Lai" <horacelai@gmail.com> wrote in message <ienja5$go3$1@fred.mathworks.com>...
> Hello,
> 
> I just upgraded to Windows 7 and my MATLAB installation didn't come with a compiler.  When I go to 'mex -setup', no compilers are listed.
> 
> Why is this?  And what do I have to do to get a compiler?  I've always used the one that came with MATLAB.
> 
> Regards,
> Horace

Perhaps because you install Matlab 64 bit version. LCC stock compiler only comes with 32 bit version. You might install Matlab 32-bit on 64-bit OS.

A free 64-bit compiler is MSVS express edition.

Bruno
0
Reply Bruno 12/20/2010 1:08:04 PM

Is it as simple as installing the softwares listed in the chart?

I took the first option.  I have successfully installed Microsoft Visual C++ 2010 Express and Windows SDK 7.1.  mex-setup still cannot find the compiler that I supposedly have installed.
0
Reply Horace 12/20/2010 10:20:32 PM

"Horace Lai" <horacelai@gmail.com> wrote in message <ieokrg$ro$1@fred.mathworks.com>...
> Is it as simple as installing the softwares listed in the chart?
> 
> I took the first option.  I have successfully installed Microsoft Visual C++ 2010 Express and Windows SDK 7.1.  mex-setup still cannot find the compiler that I supposedly have installed.

I would think that should do it... You may need to restart Windows - I recently updated Intel Fortran from v11.1.067 to v11.1.070 and it took a restart for MATLAB to see it.

>> mex -setup
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] Intel Visual Fortran 10.1 (with Microsoft Visual C++ 2005 SP1 linker) in C:\Program Files (x86)\Intel\Compiler\Fortran\10.1.032\ 
[2] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 Shell linker) in C:\Program Files (x86)\Intel\Compiler\11.1\070\ 
[3] Microsoft Visual C++ 2005 SP1 in C:\Program Files (x86)\Microsoft Visual Studio 8 
 
[0] None 
0
Reply Mark 12/21/2010 12:04:05 AM

The version of MATLAB I am using is 2010a.  I still can't get the compiler to show up on mex-setup.  Things I have tried include:

- restarting the computer
- adding these files to my MATLAB directory http://www.mathworks.com/support/solutions/en/data/1-D5W493/?solution=1-D5W493

I don't know what to do next.  It seems like it's suppose to be a really simple thing.  Maybe I shouldn't have gotten Win7 afterall 
0
Reply Horace 12/21/2010 8:45:39 AM

"Horace Lai" <horacelai@gmail.com> wrote in message <ieppfj$gr6$1@fred.mathworks.com>...
> The version of MATLAB I am using is 2010a.  I still can't get the compiler to show up on mex-setup.  Things I have tried include:
> 
> - restarting the computer
> - adding these files to my MATLAB directory http://www.mathworks.com/support/solutions/en/data/1-D5W493/?solution=1-D5W493
> 
> I don't know what to do next.  It seems like it's suppose to be a really simple thing.  Maybe I shouldn't have gotten Win7 afterall 

I'm not sure where your problem is coming from. I'm using Win 7 x64 with 64-bit MATLAB, and there was no problem with either 2010a 0r 2010b.

One thing you may want to check (before contacting technical support) is raising the application's security privileges. Navigate to /MATLAB/R2010b/bin/ and right-click on matlab.exe, go to the Compatibility tab, and check "Run this program as an administrator" or click "Change settings for all users" and then check "Run this program as an administrator".

No guarantees, and it will run an annoying dialog box every time you start MATLAB, but it helped solve some persistent read/write issues to various shared directories.
0
Reply Mark 12/21/2010 12:20:14 PM

That didn't work either.  I noticed that after I choose no compiler, which is my only option, it gave me this error message:

C:\PROGRA~1\MATLAB\R2010A\BIN\MEX.PL: Error: No compiler options file could be found to compile source code. Please run "mex -setup" to rectify.

Do you get the same when you choose 'no compiler'?
0
Reply Horace 12/21/2010 1:03:14 PM

"Horace Lai" wrote in message <ieq8ii$r53$1@fred.mathworks.com>...
> That didn't work either.  I noticed that after I choose no compiler, which is my only option, it gave me this error message:
> 
> C:\PROGRA~1\MATLAB\R2010A\BIN\MEX.PL: Error: No compiler options file could be found to compile source code. Please run "mex -setup" to rectify.
> 
> Do you get the same when you choose 'no compiler'?

No, I get this message:

Compiler: 0
 
  mex: No compiler selected. No action taken. 

Perhaps reinstalling MATLAB is called for?
0
Reply Mark 12/21/2010 1:12:15 PM

"Mark Shore" wrote in message <ieq93f$1s1$1@fred.mathworks.com>...
> "Horace Lai" wrote in message <ieq8ii$r53$1@fred.mathworks.com>...
> > That didn't work either.  I noticed that after I choose no compiler, which is my only option, it gave me this error message:
> > 
> > C:\PROGRA~1\MATLAB\R2010A\BIN\MEX.PL: Error: No compiler options file could be found to compile source code. Please run "mex -setup" to rectify.
> > 
> > Do you get the same when you choose 'no compiler'?
> 
> No, I get this message:
> 
> Compiler: 0
>  
>   mex: No compiler selected. No action taken. 
> 
> Perhaps reinstalling MATLAB is called for?

Had the same problem and after installing about 10 compilers I gave up. 

Just install the 32bit version of matlab. It works fine also on 64 bit machines and detects all the compilers. 
0
Reply Patrick 12/21/2010 1:24:16 PM

Did it, and it finally worked.  I also realized I unzipped the support files earlier in the wrong directory......

Thanks for the help!
0
Reply Horace 12/21/2010 1:54:16 PM

Horace,

Can you share exactly what you did to get it to work?  Seems lots of 
people are having a similar problem to you.

Thanks,
Gadi

On 12/21/2010 8:54 AM, Horace Lai wrote:
> Did it, and it finally worked. I also realized I unzipped the support
> files earlier in the wrong directory......
>
> Thanks for the help!
0
Reply Gadi 12/21/2010 4:07:49 PM

Gadi Reinhorn <greinhorn@mathworks.com> wrote in message <ieqjcl$8q7$1@fred.mathworks.com>...
> Horace,
> 
> Can you share exactly what you did to get it to work?  Seems lots of 
> people are having a similar problem to you.
> 

Have you guys read these pages?

http://www.mathworks.com/support/solutions/en/data/1-DLG5NF/index.html?solution=1-DLG5NF

http://www.mathworks.com/support/solutions/en/data/1-6IJJ3L/index.html?solution=1-6IJJ3L

Bruno
0
Reply Bruno 12/21/2010 8:17:21 PM

Hi Gadi,

For Windows 7 64 bit, and MATLAB 2010a, what I did was:

1) install MATLAB
2) install Microsoft Visual Studio 2010 Express C++
3) install Microsoft SDK 7.1
4) Download the patch from http://www.mathworks.com/support/solutions/en/data/1-D5W493/?solution=1-D5W493
5) Unzip the files into the correct location, 2010a/bin/win64/mexopts/

- /Horace
0
Reply Horace 12/22/2010 3:27:21 PM

13 Replies
1034 Views

(page loaded in 0.27 seconds)

Similiar Articles:


















7/22/2012 11:29:35 PM


Reply: