Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2000

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

Search the Archive

Re: Mathlink probs under Unix

  • To: mathgroup at
  • Subject: [mg26275] Re: Mathlink probs under Unix
  • From: paulh at (P.J. Hinton)
  • Date: Sun, 10 Dec 2000 00:19:47 -0500 (EST)
  • Organization: Wolfram Research, Inc.
  • References: <90kreu$>
  • Sender: owner-wri-mathgroup at

On 6 Dec 2000 02:56:14 -0500, number9 <number9 at>

> Hello, I have a Mathematica problem that perhaps someone has come across...
> I have a Sun box running Solaris8 with Mathematica 4.0 installed. I am trying to
> compile the "fastbinary" addon ( for Mathematica. I have downloaded it
> from mathsource and I am having some problems compiling it. (I am using
> GNU gcc for my compiler). From what I have read, I can either use mcc to
> compile this (with the CC flag set to gcc) or use mprep and them compile
> by hand. Here is what is going on:
> Using mcc:
> $ mcc -o binary
> -l/usr/local/mathematica/AddOns/MathLink/DevelopersKits/Solaris/CompilerAdditions/
> -lnsl -lsocket
> unterminated character constant
> Manually:
> $ mprep -o binary..c
> $ gcc -o binary
> -l/usr/local/mathematica/AddOns/MathLink/DevelopersKits/Solaris/CompilerAdditions/
> binary.c -lnsl -lsocket
> unterminated character constant
> I can not seem to get around this. I have ftp'd the files to another
> solaris host w/Mathematica
> and I get slightly differing results (it complains with mcc about 4000
> errors and fails)
> I am probably doing something idiotic, as I have not compiled anything
> in years...
> but I would like to know what it is. I am trying to read in some large
> data sets
> and I have heard that this is the way to do it (w/fast binary)

I can't reproduce this using GCC 2.8.1 for Solaris running on a
Solaris 2.6 machine.  The build steps that I used were:

mprep -o

gcc -c -I <path to mathlink.h>

gcc -o binary -L <path to libML.a> -lnsl -lsocket -lm -lML

Note the additional flags that link to the math and MathLink libraries
in the linking pass.

What release of GCC are you using?

P.J. Hinton
User Interface Programmer                         paulh at
Wolfram Research, Inc.

  • Prev by Date: Re: Mathlink probs under Unix
  • Next by Date: from Visual Basic To Mathematica through JLink: examples and problems
  • Previous by thread: Re: Mathlink probs under Unix
  • Next by thread: Re: Mathlink probs under Unix