Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
multiple C++ files_to_mex conversion

Subject: multiple C++ files_to_mex conversion

From: Aidy

Date: 11 Feb, 2011 00:12:03

Message: 1 of 2

Hello everyone,

I have several .cpp(c++ files) and .h(header) files. There is one main .cpp file that executes the software based on all the multiple .cpp and .h files which I have.

I know nothing about C++. If I wish to convert to matlab mex , do I need to interfere/modify the headers and code of all the .cpp and .h files, or do I need to just modify the single .cpp file that executes the software?

please let me know
aiden

Subject: multiple C++ files_to_mex conversion

From: James Tursa

Date: 11 Feb, 2011 00:34:03

Message: 2 of 2

"Aidy" wrote in message <ij1usj$es1$1@fred.mathworks.com>...
> Hello everyone,
>
> I have several .cpp(c++ files) and .h(header) files. There is one main .cpp file that executes the software based on all the multiple .cpp and .h files which I have.
>
> I know nothing about C++. If I wish to convert to matlab mex , do I need to interfere/modify the headers and code of all the .cpp and .h files, or do I need to just modify the single .cpp file that executes the software?
>
> please let me know
> aiden

Depends on what your C++ code does. If it is just processing and needs a simple i/o interface with MATLAB, then you may not need to do much except create the interface. But if the interface is going to involve complicated C++ classes going back & forth between your code and MATLAB then there could be quite a bit of work to do. Or if your C++ code has interactive i/o then there will be quite a bit of work to do. Can't say much more without knowing more details of your C++ code.

James Tursa

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us