Path: news.mathworks.com!not-for-mail
From: "Matthew" <mp_nospam@yahoo.com>
Newsgroups: comp.soft-sys.matlab
Subject: Re: running a c++ program using unix command
Date: Sun, 18 Jan 2009 16:51:02 +0000 (UTC)
Organization: Columbia
Lines: 23
Message-ID: <gkvmlm$8cq$1@fred.mathworks.com>
References: <gj7286$dm1$1@fred.mathworks.com> <op.unvdjikya5ziv5@uthamaa.dhcp.mathworks.com>
Reply-To: "Matthew" <mp_nospam@yahoo.com>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1232297462 8602 172.30.248.35 (18 Jan 2009 16:51:02 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 18 Jan 2009 16:51:02 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 839019
Xref: news.mathworks.com comp.soft-sys.matlab:512315


Hi Ashish,

mexatexit.cpp compiles and runs for me just fine.  The headers I use which aren't in mexatexit are <fstream> and <iostream>.  And mexcpp.cpp, which includes <fstream> DOESN'T run in the same manner--compiles with warning, then gives the same error message.  I doubt this is related but I can only compile these programs when I copy them to a directory which isn't a subdirectory of Matlab; otherwise I get a 'permission denied, can't create matreader.o'--despite chmod 777.  Like I say probably irrelevant but I thought I'd mention it.

Best,
Matt

"Ashish Uthama" <first.last@mathworks.com> wrote in message <op.unvdjikya5ziv5@uthamaa.dhcp.mathworks.com>...
> 
> Are you facing this issue with all MEX files you create? Does this project  
> source code have any specific GLIBC version dependencies?
> 
> Without any changes (in link targets or env variables), you should be able  
> to compile a simple MEX file (a printf ) and run it. This would link  
> against the libraries in MATLAB install path. If not, please post what you  
> see (warnings/error message, outputs of LDD from within MATLAB).
> 
> Any changes you do to LD_LIBRARY_PATH from within MATLAB (using SETENV)  
> are not retained between MATLAB sessions. For that matter, it is not  
> retained in a *nix shell either. You would have to explicitly set it each  
> time if you so choose (use startup.m/matlabrc).
>