My main aim is to call MATLAB engine from a C program. do
some computation in MATLAB and return back the result to the
C program. But just at the start i am facing a problem.
I am using MATLAB R14 SP3 in Linux.
I cud not run the example engdemo.c from command prompt!! i
had changed the #include "engine.h" to point to the same
file in the include directory. after trying to compile the
example, i run into the following error:
[root@narmada etc]# gcc engdemo.c -o engdemo
/tmp/ccsXH5nc.o: In function `main':
engdemo.c:(.text+0x4a): undefined reference to `engOpen'
engdemo.c:(.text+0xa3): undefined reference to
`mxCreateDoubleMatrix'
engdemo.c:(.text+0xb1): undefined reference to `mxGetPr'
engdemo.c:(.text+0xe8): undefined reference to `engPutVariable'
engdemo.c:(.text+0xfb): undefined reference to `engEvalString'
engdemo.c:(.text+0x10e): undefined reference to `engEvalString'
engdemo.c:(.text+0x121): undefined reference to `engEvalString'
engdemo.c:(.text+0x134): undefined reference to `engEvalString'
etc..........
I tried to solve it on my own, bt in vain.
i come to know that theres a linking problem, bt how to
solve it?
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central.
Read the complete Terms prior to use.