Reputation: 63
I'm trying to use LCC to cross compile a MATLAB Simulink model to a linux binary (host is on windows).
So I started to edit a "Code generation" profile to fit my need. I edited the ~/MATLAB\R2011b\rtw\c\ert profile and tried to add the -Wf-target=x86/linux option to the CFLAGS ... but it seems there are also library problems and linking problem ... so I guess this is not the right way to do.
Any of you already done this kind of cross compilation ? What's the best way to achieve this ?
Thanks
Upvotes: 2
Views: 2389
Reputation: 21561
Assuming that your main constraint is that you don't have MATLAB installed on the target machine, I believe this is the way to go:
Rather than compiling the matlab code, generate C code. This code can then be compiled on any system that you like, without requiring matlab.
This was suggested on Matlab Central. (Dead link. Copies can be found on archive.org and Google Groups)
Upvotes: 1