<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173384</link>
    <title>MATLAB Central Newsreader - Calling MATLAB from C</title>
    <description>Feed for thread: Calling MATLAB from C</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Mon, 28 Jul 2008 17:39:02 -0400</pubDate>
      <title>Calling MATLAB from C</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/173384#445914</link>
      <author>Arpita </author>
      <description>My main aim is to call MATLAB engine from a C program. do&lt;br&gt;
some computation in MATLAB and return back the result to the&lt;br&gt;
C program. But just at the start i am facing a problem.&lt;br&gt;
&lt;br&gt;
I am using MATLAB R14 SP3 in Linux.&lt;br&gt;
I cud not run the example engdemo.c from command prompt!! i&lt;br&gt;
had changed the #include &quot;engine.h&quot; to point to the same&lt;br&gt;
file in the include directory. after trying to compile the&lt;br&gt;
example, i run into the following error:&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
[root@narmada etc]# gcc engdemo.c -o engdemo&lt;br&gt;
/tmp/ccsXH5nc.o: In function `main':&lt;br&gt;
engdemo.c:(.text+0x4a): undefined reference to `engOpen'&lt;br&gt;
engdemo.c:(.text+0xa3): undefined reference to&lt;br&gt;
`mxCreateDoubleMatrix'&lt;br&gt;
engdemo.c:(.text+0xb1): undefined reference to `mxGetPr'&lt;br&gt;
engdemo.c:(.text+0xe8): undefined reference to `engPutVariable'&lt;br&gt;
engdemo.c:(.text+0xfb): undefined reference to `engEvalString'&lt;br&gt;
engdemo.c:(.text+0x10e): undefined reference to `engEvalString'&lt;br&gt;
engdemo.c:(.text+0x121): undefined reference to `engEvalString'&lt;br&gt;
engdemo.c:(.text+0x134): undefined reference to `engEvalString'&lt;br&gt;
&lt;br&gt;
etc..........&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
I tried to solve it on my own, bt in vain.&lt;br&gt;
i come to know that theres a linking problem, bt how to&lt;br&gt;
solve it?&lt;br&gt;
&lt;br&gt;
Please help me if you can !!&lt;br&gt;
Please !!!&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
Thanking You&lt;br&gt;
Arpita </description>
    </item>
  </channel>
</rss>

