How to compile matlab coder package on different operating system
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
will
el 14 de Oct. de 2014
Comentada: James Ryan
el 7 de Sept. de 2016
Hi, I'm working on exporting a simulation from MATLAB into C for use on a linux cluster. Unfortunately, the cluster doesn't have MATLAB installed and I won't be able to install it. However, I have been able to convert the program into a standalone C application that runs on my Mac OSX 10.8. I can package the generated .c and .h files, but the generated makefile appears to be specific to the Mac that it was generated on.
My question is: how can I generate a makefile that will then compile the program for use on a linux machine. The makefile functionname_rtw.mk is much more complicated than any makefile I've created and refers directly to the MATLAB_ROOT, MATLAB_BIN, MATLAB_ARCH_BIN and ARCH folders. How can I make the whole package portable.
Thank you.
0 comentarios
Respuesta aceptada
Jorik
el 15 de Oct. de 2014
Editada: Jorik
el 15 de Oct. de 2014
I think you can use the packNGo function from Simulink Coder to help relocate all necessary files for an external development environment:
web(fullfile(docroot, 'rtw/ug/program-builds.html#bqufw6y'))
The documentation also contains tips for modifying template makefiles for other platforms:
web(fullfile(docroot, 'rtw/ug/cross-compiling-code-generated-on-a-microsoft-windows-system.html'))
2 comentarios
James Ryan
el 7 de Sept. de 2016
The question specifies Matlab (which I have, including Matlab coder), but the answer depends on Simulink coder (which I don't have). Should these instructions work for me?
Más respuestas (0)
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!