Locate compiler on Windows 64-bit

Hi,
I'm struggeling to set up MatLab so I can compile mexfiles. Running mex -setup seems to work just fine, and I get the following configuration:
>> cc = mex.getCompilerConfigurations;
>> cc
cc =
mex.CompilerConfiguration
Package: mex
Properties:
Name: 'Microsoft Visual C++ 2010 Express'
Manufacturer: 'Microsoft'
Language: 'C++'
Version: '10.0'
Location: 'C:\Program Files (x86)\Microsoft Visual Studio 10.0'
Details: [1x1 mex.CompilerConfigurationDetails]
however whien trying to compile the examplefile timestwo.c I get this:
>> mex timestwo.c
Error: Could not find the compiler "cl" on the DOS path.
Use mex -setup to configure your environment properly.
C:\PROGRA~1\MATLAB\R2011A\BIN\MEX.PL: Error: Unable to locate compiler.
I have no probelm compling a c++ file directly with the compiler and I tred to follow various tips for this problem on 64bit platforms but they all seemed a bit different from my problem. I have Matlab 2011r under windows 7 (64bit), and SDK7.1 with 64bit tools.
cheers, Robert

Answers (1)

Kaustubha Govind
Kaustubha Govind on 9 Nov 2012
When you ran "mex -setup", was the utility able to locate the installed compilers automatically, or did you have to manually specify the path? If you did the latter, then your compiler may not be installed correctly. Perhaps it hasn't been added to the system path?

2 Comments

Yes, it was located automatically.
Robert: Hmm.. not sure what could be going on then. Corrupt installation of Visual Studio maybe? Perhaps you should contact MathWorks Tech Support if you don't receive any other help on this forum.

Sign in to comment.

Categories

Products

Asked:

on 9 Nov 2012

Community Treasure Hunt

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

Start Hunting!