From: tarpanelli on
Hello all,

I am not a Mathematica 's user but I remember it during my phd thesis about 8
years ago . Now I am just asking you some feedback about the possibility for
Mathematica to link itself to a C++ lib and use it inside the notebook.
If I remember well there is a MathLink which can be usded but it is just for C
files and it could give some problems with object oriented architectore.
I would like to know if there is something news in v.7 or if someone in the
group already has done this type of job,

Thank you in advance

Paolo

From: John Fultz on
MathLink itself is a strictly C interface, but it plays well with C++ code. I
use MathLink with C++ all the time and, while I might occasionally complain
about the lack of some obvious extensions into the world of C++, I never have to
deal with anything which actually breaks in a C++ environment.

Sincerely,

John Fultz
jfultz(a)wolfram.com
User Interface Group
Wolfram Research, Inc.

On Wed, 14 Jul 2010 05:35:01 -0400 (EDT), tarpanelli(a)libero.it wrote:
> Hello all,
>
> I am not a Mathematica 's user but I remember it during my phd thesis
> about 8 years ago . Now I am just asking you some feedback about the
> possibility for Mathematica to link itself to a C++ lib and use it inside
> the notebook. If I remember well there is a MathLink which can be usded
> but it is just for C files and it could give some problems with object
> oriented architectore. I would like to know if there is something news in
> v.7 or if someone in the group already has done this type of job,
>
> Thank you in advance
>
> Paolo


From: David Bailey on
On 14/07/10 10:34, tarpanelli(a)libero.it wrote:
> Hello all,
>
> I am not a Mathematica 's user but I remember it during my phd thesis about 8
> years ago . Now I am just asking you some feedback about the possibility for
> Mathematica to link itself to a C++ lib and use it inside the notebook.
> If I remember well there is a MathLink which can be usded but it is just for C
> files and it could give some problems with object oriented architectore.
> I would like to know if there is something news in v.7 or if someone in the
> group already has done this type of job,
>
> Thank you in advance
>
> Paolo
>
You would write a small C program that used MathLink to communicate with
Mathematica, and also called into your C++ library. This is a quite
normal thing to do.

Since you are not a Mathematica user, it may be worth mentioning that it
is even easier to communicate from Mathematica to Java - which is, of
course, also object oriented. In simple cases this can be done without
writing any Java code, so if your library has a Java version, that might
be the one to use.

David Bailey
http://www.dbaileyconsultancy.co.uk