help-gsl
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-gsl] Compiling GSL with C++


From: Tommy Nordgren
Subject: Re: [Help-gsl] Compiling GSL with C++
Date: Thu, 4 Aug 2005 16:38:06 +0200


Aug 4, 2005 kl. 4:06 PM skrev Kevin Thornton:

How about setting a custom gsl error handler that
throws an exception?  You can set custom error
handlers for the gsl using routines described here:
http://www.gnu.org/software/gsl/manual/gsl-ref_3.html#SEC23


The GSL routines are C: It is impossible for error handlers called by C routines to throw an exception, since throwing an exception across a C routine will cause the program to be unconditionally terminated by the C++ exception handling system. This can only be fixed by recompiling the library source itself with a C++ compiler.


The functions take char * arguments which can then be
passed along to exceptions, etc.

This may be a much simpler solution than modifying the
library itself.

--Kevin

--- Tommy Nordgren <address@hidden> wrote:




I'm interested in modifying the GSL source, to make
it compile with a
C++
compiler instead. I would like suggestions on doing
this as easy as
possible.

The reason I want to do this, is to allow error
handlers to throw
exceptions,
since it's not possible to throw exceptions across
code compiled as C++
(If one tries, the exception handling system will
exit the app, and
this is definitely
not what's wanted when doing time-consuming
computations)

"Home is not where you are born, but where your
heart finds peace" -
Tommy Nordgren, "The dying old crone"



_______________________________________________
Help-gsl mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/help-gsl




Kevin Thornton
Committee on Genetics
University of Chicago
http://www.molpopgen.org

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


_______________________________________________
Help-gsl mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/help-gsl


"Home is not where you are born, but where your heart finds peace" -
Tommy Nordgren, "The dying old crone"





reply via email to

[Prev in Thread] Current Thread [Next in Thread]