Path: news.mathworks.com!not-for-mail
From: "David Doria" <daviddoria@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Call a MEX function from Matlab Engine?
Date: Fri, 14 Mar 2008 16:18:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 24
Message-ID: <fre8fp$f96$1@fred.mathworks.com>
References: <frc4bp$ipi$1@fred.mathworks.com> <frc7ir$s19$1@fred.mathworks.com> <frccfq$l2f$1@fred.mathworks.com> <frch5p$bdj$1@fred.mathworks.com> <frdvs6$lim$1@fred.mathworks.com> <fre31g$bk1$1@fred.mathworks.com> <fre6af$jpp$1@fred.mathworks.com> <fre6t6$rm7$1@fred.mathworks.com>
Reply-To: "David Doria" <daviddoria@gmail.com>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1205511481 15654 172.30.248.38 (14 Mar 2008 16:18:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 14 Mar 2008 16:18:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1105197
Xref: news.mathworks.com comp.soft-sys.matlab:457270



Right, but I'm saying that with the escape characters in the
string the compiler actually complained that D and D and M
and V and P and M were not valid escape characters.  

When I had some other matlab stuff in my c++ code WITH the
escape characters, the compiler didnt complain and compiled
fine.  When I removed the other matlab stuff, and still had
the escape characters, it complained about the escape
characters.  See what I'm saying? I no longer have a
question about it because it works not, but it was really odd.

"John Reilly" <jrhokie1.nospam@yahoo.com> wrote in message
<fre6t6$rm7$1@fred.mathworks.com>...
> I'll tell you why it ignored your "cd" command:  you're
> using C/C++ and your string contained "\".  This is an
> escape character in C strings.  If you want your path to be
> passed to MATLAB, you need to escape the escape character:
> 
> engEvalString(ep, "cd 'C:\\Documents and Settings\\Dave\\My
> Documents\\Visual Studio 2005\\Projects\\Matlab MEX';");
> 
> oops.
>