User forums > Using Code::Blocks

How to compile a Matlab/Simulink C-File

(1/1)

BennM:
Hi,

is there any opportunity to compile a c-file in Codeblocks für Matlab/Simulink (mexw32-File)?


Greetings: BennM

MortenMacFly:

--- Quote from: BennM on April 01, 2008, 10:28:35 am ---is there any opportunity to compile a c-file in Codeblocks für Matlab/Simulink (mexw32-File)?

--- End quote ---
Yes, there is in principle. I have integrated the LCC compiler (that ships with Matlab, but also the stand-alone version) with C::B. In addition I have implemented a Matlab C-S-Function wizard. All is working properly but I haven't asked the big boss whether I should submit or not.

There is one major drawback: The LCC compiler queries user input under certain circumstances. Although this won't happen if properly installed,  the core compiler plugin cannot handle such user input queries. Thus C::B freezes if this happens. Notice that this only applies to LCC thus I haven't committed yet.

Yiannis: Should we discussion this again...?!

MortenMacFly:
Oh: BTW: You can create MEX function using GCC, too. This works in Windows and Linux, hence under Windows it's not an officially supported compiler (by Mathworks), so it might have bad side-effects. Anyways - all my MEX functions are GCC compiled and work very well.

The wizard can handle both... probably I'll start by committing just the wizard.

BennM:
I am using the Free Commandline Borland Compiler!

Navigation

[0] Message Index

Go to full version