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

답변 (1개)

Kaustubha Govind
Kaustubha Govind 2012년 11월 9일

0 개 추천

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

Robert Johansson
Robert Johansson 2012년 11월 9일
Yes, it was located automatically.
Kaustubha Govind
Kaustubha Govind 2012년 11월 12일
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.

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

제품

질문:

2012년 11월 9일

Community Treasure Hunt

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

Start Hunting!

Translated by