Compiler not found

  • Follow


Hi! 

I'm using Windows 7  64bit and Matlab 2010a. 

I got the sparsesubaccess -package from file exchange:
http://www.mathworks.com/matlabcentral/fileexchange/23488-sparse-sub-access

and I have C++ 2005 Redistributable Package (x64) installed (I also tried 2008 with same results).

When I try to compile the files in the package as instructed, I get error:

  Error: Could not find the compiler "cl" on the DOS path. 
         Use mex -setup to configure your environment properly. 

I tried mex -setup, but there are no compiler alternatives there, only [0] No compiler. 

At my work place (32bit Vista, matlab 2010a) I had no errors what so ever, so I have no idea what compiler we have there.  I thought compiling mex files would be something very trivial... 

I also tried to install the free MS Visual C++ express, and I could select a compiler, but it did't work either as matlab gave me an error that a 64-bit compiler could not be found and then error:
??? Error using ==> mex at 222
Unable to complete successfully.

Any help would be appreciated. 
0
Reply Jeff 4/10/2010 1:59:27 PM

Jeff,
I put the Window precompiled MEX file here: 
http://www.mediafire.com/download.php?nnzy0uu2qzg

Bruno
0
Reply Bruno 4/10/2010 2:37:05 PM


Thank you Bruno! 

If only I had checked my thread a bit more earlier... I just spent ja a couple of hours re-installing everything just to figure out that if I choose "no" to mex -setup's first question "Would you like mex to locate installed compilers [y]/n?"
I got a list of compilers from which I chose the Visual C++ 2008 which worked nicely. 

I'll store your compiled files just in case anyway but for now, problem solved.
0
Reply Jeff 4/10/2010 5:45:22 PM

Thank you Bruno! 

If only I had checked my thread a bit more earlier... I just spent ja a couple of hours re-installing everything just to figure out that if I choose "no" to mex -setup's first question "Would you like mex to locate installed compilers [y]/n?"
I got a list of compilers from which I chose the Visual C++ 2008 which worked nicely. 

I'll store your compiled files just in case anyway but for now, problem solved.
0
Reply Jeff 4/10/2010 5:45:22 PM

Dear all,

Follow the instruction in this page:

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

It adds a compiler to my Matlab 2009b under Windows 7 in the mex -setup.

Now my embedded Matlab function in Simulink works.

Just make sure the simulink file or anything that you are compiling do not have spaces in the path. Windows can handle spaces, but Matlab can't.

Best of Luck,

Nixon
0
Reply Tung 1/11/2011 11:25:06 AM

4 Replies
511 Views

(page loaded in 0.15 seconds)

Similiar Articles:













7/25/2012 11:15:20 AM


Reply: