For Programmers: Free Programming Magazines  


Home > Archive > Matlab > October 2006 > Re: Using MATLAB from g++ code









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: Using MATLAB from g++ code
g++ MATLAB

2006-10-31, 7:11 pm

Hi,

Thanks for the info. I found some more material titled "calling
matlab from C".

<http://www.mathworks.com/access/hel...nal/f25603.html>

I followed the steps mentioned, and I was able to run the demo file
engdemo.c. But when I tried running a C++ code, it gives me an error.

/usr/local/matlab/bin/mex: line 1330: -c: command not found

mex: compile of 'test.cpp' failed.

??? Error using ==> mex
Unable to complete successfully

I guess the MEX script only supports C and FORTRAN codes. Do you have
any information about this?

Thanks for your help in advance.

Glenn.Ehrlich wrote:
>
>
>
> g++ MATLAB wrote:
>
> for
> engPutVariable)
> library
>
> You'll need to include <matrix.h> which is in
> $MATLAB/extern/include.
>
> You'll also need to manually link to the MATLAB libraries. Here's
> a
> tech note with some suggestions:
>
> <http://www.mathworks.com/support/so...olution=1-1BECU>
>
> Glenn
>
>

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com