Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1993
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1993

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

Search the Archive

Problems using C++/MathLink on SGI (fix: g++)

  • To: mathgroup at yoda.physics.unc.edu
  • Subject: Problems using C++/MathLink on SGI (fix: g++)
  • From: Pekka.Janhunen at fmi.fi
  • Date: Fri, 19 Nov 1993 15:35:22 -0800

I have a C++ module using the AT&T complex class,
one of the functions is defined extern "C", and it is called by
an interface module in plain C, which is then called by Mathematica.
I'm using Mma 2.2 in SGI IRIX4.0.5.

I am able to return e.g. the complex number zero from the C++
module, but whenever I try to do anything more serious, I just get:

General::digit: Digit at position 1 in NaN is too large to be used in base 10.

LinkObject::linkd:
   LinkObject[hybridML, 14, 1] is closed; the connection is dead.

Out[31]= $Failed

or something similar (the General::digit is not always there).
This seems to happen also if I try to output to cerr or clog from C++.

However when I switched to g++ (and changed cc to gcc in the mcc script),
things started working.

Is anyone else facing similar problems, have you tried linking C++
with Mathlink? Of course I can manage with gcc/g++ now, but it would be
nice if the SGI cc/CC worked also. CC is AT&T Cfront 3.0.1.

Pekka







  • Prev by Date: ListPlot with legend
  • Next by Date: Re: Naming the Mathematica language
  • Previous by thread: ListPlot with legend
  • Next by thread: Re: minimal surfaces