Thread Subject: Everytime when I run my mex dll program, Matlab was forced to exit... what's wrong?

Subject: Everytime when I run my mex dll program, Matlab was forced to exit... what's wrong?

From: Luna Moon

Date: 11 Sep, 2007 00:54:03

Message: 1 of 3

Hi all,

I compiled a Matlab mex dll file on Matlab 2007a, with MSVC++ express
2005.

Everytime I run the mex dll, Matlab was forced to exit without giving
any errors or warnings...

What's wrong?

Thanks!

Subject: Everytime when I run my mex dll program, Matlab was forced to exit... what's wrong?

From: Joaquim Luis

Date: 11 Sep, 2007 01:36:20

Message: 2 of 3

 Luna Moon
> Hi all,
>
> I compiled a Matlab mex dll file on Matlab 2007a, with
MSVC++ express
> 2005.
>
> Everytime I run the mex dll, Matlab was forced to exit
without giving
> any errors or warnings...
>
> What's wrong?

Quite likely you have an
exit;
statement in your C code and for Matlab, exit, means exit
without any exitation or warnings.

Subject: Everytime when I run my mex dll program, Matlab was forced to exit... what's wrong?

From: Steve Amphlett

Date: 11 Sep, 2007 08:27:06

Message: 3 of 3

"Joaquim Luis" <jluis@--ualg--.pt> wrote in message
<fc4rej$2ec$1@fred.mathworks.com>...
> Luna Moon
> > Hi all,
> >
> > I compiled a Matlab mex dll file on Matlab 2007a, with
> MSVC++ express
> > 2005.
> >
> > Everytime I run the mex dll, Matlab was forced to exit
> without giving
> > any errors or warnings...
> >
> > What's wrong?
>
> Quite likely you have an
> exit;
> statement in your C code and for Matlab, exit, means exit
> without any exitation or warnings.

... or an exit() lurking in some (badly written) library
you link to. Or perhaps an assert() gets tripped.

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com