How do I use the mcc function from windows command line?

14 visualizaciones (últimos 30 días)
David
David el 20 de Dic. de 2012
I would like to use the mcc function on a 64 bit machine to build a standalone executable for a 32 bit machine. The doc file for the mcc function says I must do this from a Windows commmand line, but provides no example of how to do so. I unsuccessfully attempted to perform the task with the following...
>cd directory/containing/mfile/and/previous/64bit/executable
>mcc -m mfile -o exeFileName -win32
... and recieved the error: "Unable to find a suitable install area"
Is there something else that needs to be included in the directory with the m file? Or am I facing another issue all together?

Respuestas (1)

Image Analyst
Image Analyst el 20 de Dic. de 2012
Why not do it from the MATLAB command line, instead of the Windows command line. At least that's how I always do it.
  4 comentarios
Walter Roberson
Walter Roberson el 21 de Dic. de 2012
Do you have the 32 bit version of MATLAB installed as well as the 64 bit version ?
Image Analyst
Image Analyst el 21 de Dic. de 2012
You can install both the 32 bit version and the 64 bit version on your 64 bit computer. I'm not sure what it's talking about when it says you can only use that option when both versions have the same installation root. I don't know if that is just the folder from which you ran the installers, or if that's the folder where the versions are installed. I can't find any info on install_root in the help. If it's where you installed from, I don't know why that would have anything to do with anything - heck you can just delete that folder after everything is installed. I have both versions installed, and it puts the 64 bit MATLAB into c:\program files\matlab\R2012b and it puts the 32 bit into c:\program files (x86)\MATLAB\R2012b. What I do is to run the 32 bit version and use mcc from the MATLAB command window when I want to compile for people using 32 bit windows and run the 64 bit version and run mcc from the MATLAB command line if I want to compile for people using the 64 bit version of windows. Will that work for you? It should because it works for me. Though, they've told me to re-run "mcc -setup" and "mex -setup" when I switch between versions.
If you still have some rhetorical question about what the -win32 switch really means when you try to run mcc from an OS console prompt instead of the MATLAB command window prompt, then you can call them and ask them.

Iniciar sesión para comentar.

Categorías

Más información sobre C Shared Library Integration en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by