|
Peter Boettcher <boettcher@ll.mit.edu> wrote in message
<muy8x59lnvz.fsf@G99-Boettcher.llan.ll.mit.edu>...
> "Mohammad Hasan" <Mohammad.Hasan@mathworks.com> writes:
>
> > Hello,
> >
> > I am intending to use some of the matlab functions in a
> > C++ program. I tested the engdemo.c program for this purpose
> > and it compiled and ran ok with the instruction given in
> > matlab reference manual. It requires to run the following
> > mex command in the matlab command window:
> >
> > mex('-f', [matlabroot '/bin/engopts.sh'], mexfilename);
> >
> >
> > I find it very inconvenient way to compile c/c++ program. I
> > was wondering, if anybody already have a standard unix
> > makefile that can compile the engdemo.c program.
>
> You can also call the exact same mex command from the UNIX
command
> line. Meaning it can be called from a Makefile.
>
> Or, run the mex command line with an additional -n flag to
see the
> output. Then paste the appropriate CFLAGS and whatnot
into your
> Makefile.
>
> -Peter
Thank you, Peter. It worked. I really appreciate it.
Hasan
|