MathGroup Archive 2000

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: mathlink

  • To: mathgroup at smc.vnet.net
  • Subject: [mg25202] Re: [mg24971] Re: [mg24957] mathlink
  • From: tgayley at wolfram.com (Todd Gayley)
  • Date: Fri, 15 Sep 2000 02:21:41 -0400 (EDT)
  • Organization: Wolfram Research, Inc.
  • References: <200008281227.IAA00006@smc.vnet.net> <HeUr5.3627$gm5.8203@ralph.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

On Fri, 01 Sep 2000 20:23:03 GMT, Christopher Lee French
<clfrench at bellatlantic.net> wrote:

>Murphy,
>
>There is a  filename.c library of custom functions at my work that I would like to
>access using Mathematica. What is your method for calling c functions using J/Link? I have
>J/Link and I can get 50% of the examples to run on my PC. Is there any hope for me
>of this being easy?
>
>Chris French

Chris,

The reason some of the J/Link examples are not working for you is that
they use the Swing GUI library. You are using the Microsoft Java
runtime, which does not include Swing. I think you'll find that if you
install Sun's Java runtime
(http://www.javasoft.com/j2se/1.3/download-windows.html), all the
examples will work fine.

I would not recommend using J/Link to call C functions. J/Link makes
it trivial to call Java functions from Mathematica, but to call C
functions you'd have to write stub C code that wrestles with the Java
Native Interface (JNI), which is at least as complex as dealing with
raw MathLink from C. You are probably better off just using the
standard "template" mechanism for accessing C functions from
Mathematica via MathLink.

--Todd

Todd Gayley
Wolfram Research


  • Prev by Date: Re: writing mathematica script files for the math kernel under linux
  • Next by Date: Re: Amazing backgrounds
  • Previous by thread: mathlink
  • Next by thread: ButtonBox, styles, GraphicsGenerator.nb