getting error in building executables using mcc

Hi
I am using 64 bit matlab on 64 bit win xp platform. want to create a executable using mcc compilers. I want to compile test1.m file which is like this
++++++++++++++++
function test1()
hello
end
+++++++++++++++++
it is calling a hello.mexw64 executable. Which was created using mex interface. I am currently using visual studio 2008 express edition. also SDK and framework install .
when i issue command
++++++++++++++++++
mcc -m test1
++++++++++++++++++
i am getting this error
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
C:\PROGRA~2\MATLAB\R2008A\BIN\MEX.PL:
Error: Using options file:
C:\Documents and Settings\302014448\Application Data\MathWorks\MATLAB\R2008a\compopts.bat
You cannot use this file with the WIN32 architecture because it enables
a compiler for a different architecture.
Running mbuild -setup may resolve this problem.
Error: An error occurred while shelling out to mbuild (error code = 255). Unable to build executable. +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Réponses (1)

Friedrich
Friedrich le 4 Sep 2012
Modifié(e) : Friedrich le 4 Sep 2012
Hi,
do what the error tells you. Run
mbuild -setup
and select a Compiler. It seems like you have installed 8a as 64bit and 32bit. These two version share the preference directory which leads to the 64bit version picks up compiler setttings from the 32bit version.
In addtion the VC Express isnt supported for 8a in 64bit. You need a supported 64bit Compiler:
The best would be to upgrade to 10b or higher because there you dont need any compiler for generating an exe with the ML Compiler (for C/C++ DLLs you need one).

Catégories

En savoir plus sur MATLAB Compiler dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by