Problem with mex compilation

4 views (last 30 days)
Niranjan
Niranjan on 14 Feb 2011
Somebody please help me in this regard.When I try to set up my mex compiler,I get the following error. Please help
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] Microsoft Visual C++ 2008 Express in F:\visual c++
[0] None
Compiler: 1
Please verify your choices:
Compiler: Microsoft Visual C++ 2008 Express Location: F:\visual c++
Are these correct [y]/n? y
*************************************************************************** Error: Could not find the 64-bit compiler. This may indicate that the "X64 Compilers and Tools" or the Microsoft Windows Software Development Kit (SDK) is not installed. To build 64-bit MEX-files Microsoft Visual C++ 2008 Express Edition requires that these two packages are installed properly. ***************************************************************************
Trying to update options file: C:\Users\dell\AppData\Roaming\MathWorks\MATLAB\R2010a\mexopts.bat From template: F:\MATLAB~4\bin\win64\mexopts\msvc90freeopts.bat
Done . . .
************************************************************************ Warning: The MATLAB C and Fortran API has changed to support MATLAB variables with more than 2^32-1 elements. In the near future you will be required to update your code to utilize the new API. You can find more information about this at: http://www.mathworks.com/support/solutions/en/data/1-5C27B9/?solution=1-5C27B9 Building with the -largeArrayDims option enables the new API. ************************************************************************
>> mex FaceDetect.cpp -I../Include/ ../lib/*.lib -outdir ../bin/ Error: Could not find the compiler "cl" on the DOS path. Use mex -setup to configure your environment properly.
F:\MATLAB~4\BIN\MEX.PL: Error: Unable to locate compiler.
??? Error using ==> mex at 222 Unable to complete successfully.

Accepted Answer

Aurelien Queffurust
Aurelien Queffurust on 14 Feb 2011
As the output of your mex -setup mentions : In order to build 64-bit binaries, the "x64 Compilers and Tools" and Microsoft Windows Software Development Kit (SDK) must both be installed.
Please read this technical solution :
From the output of your mex -setup , I can see that you are using R2010a. The above technical note says : Note that in some cases, the configuration steps described below are known to work with MATLAB 7.8 (R2009a), MATLAB 7.9 (R2009b) and MATLAB 7.10 (R2010a) as well.

More Answers (0)

Categories

Find more on Write C Functions Callable from MATLAB (MEX Files) in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!