MathGroup Archive 1999

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

Search the Archive

Re: MathLink examples

  • To: mathgroup at smc.vnet.net
  • Subject: [mg17560] Re: MathLink examples
  • From: paulh (P.J. Hinton)
  • Date: Mon, 17 May 1999 02:14:20 -0400
  • Organization: Wolfram Research, Inc.
  • References: <7hgbmd$49a@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

In article <7hgbmd$49a at smc.vnet.net>, Roger Mason <rmason at sparky2.esd.mun.ca> writes:

> I have just transferred from W95 to Linux and am having some trouble
> compiling & running the MathLink examples.
> 
> Following the instructions in the documentation, I attempted to create
> an executable from addtwo.c using "make" and the Makefile in the
> examples directory. The error returned is "undefined reference to
> MLMain". I presume that the compiler cannot find mathlink.h or libML.a,
> but the paths in the Makefile are correct.
> 
> I then attempted to create the executable using mcc. An executable is
> indeed created but will not install, the error message informs me that
> the link is dead.
> 
> The pre-built examples work fine, so obviously the problem is with my
> lack of experience using gcc & Linux.
> 
> Any help to get me going will be much appreciated.

Check to see what the default runtime library environment on your 
machine is.  If it is a recent Linux distribution, chances are that
you are using version 2 of the GNU C library (glibc2).  The version
number of this library is libc.so.6.x.  The MathLink library libML.a
that comes with the developer kit on the CD-ROM is linked against
the older C library -- libc.so.5.x.  

If the above situation is the case, you'll need to download a new 
relelase of the MathLink Developer's Kit that contains a glibc2 
version of libML.a.

Further information can be found at this FAQ page.

	http://www.wolfram.com/support/MathLink/Linux/RedHat5.html

--
P.J. Hinton	
Mathematica Programming Group		paulh at wolfram.com
Wolfram Research, Inc.			http://www.wolfram.com/~paulh/
Disclaimer: Opinions expressed herein are those of the author alone.


  • Prev by Date: Re: Function evaluation
  • Next by Date: Re: Insertion Point Bug
  • Previous by thread: MathLink examples
  • Next by thread: Impulse Fumction using UnitStep???