Locate compiler on Windows 64-bit

4 Ansichten (letzte 30 Tage)
Robert Johansson
Robert Johansson am 9 Nov. 2012
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

Antworten (1)

Kaustubha Govind
Kaustubha Govind am 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 Kommentare
Robert Johansson
Robert Johansson am 9 Nov. 2012
Yes, it was located automatically.
Kaustubha Govind
Kaustubha Govind am 12 Nov. 2012
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.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Troubleshooting in MATLAB Compiler SDK finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by