Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1990
*January
*February
*March
*April
*May
*June
*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 1990

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

Search the Archive

mathink. in NeXT

  • To: mathgroup at yoda.ncsa.uiuc.edu
  • Subject: mathink. in NeXT
  • From: uunet!icluna.kobe-u.ac.jp!cai (Dong Sheng Cai)
  • Date: Fri, 13 Apr 90 21:08:59 JST

I have problem to use mathlink in NeXT (version 1.0). 
I want to link  my own C program to Mathematica and evaluate 
my program as if it were a build-in function.   
However, it is almost impossible for me to use mathlink in NeXT system and 
link my C program to Mathematica. 
I am using mathlink.c and mathlink.h which are 
stored in the Sources subdirectory 
of the main Mathematica directory, and my program is named sample.c.

Following  is what is happening in my NeXT.......


  |NeXT> math

  |Mathematica 1.2 (August 30, 1989) [With pre-loaded data]
  |by S. Wolfram, D. Grayson, R. Maeder, H. Cejtin,
  |   S. Omohundro, D. Ballman and J. Keiper
  |with I. Rivin and D. Withoff
  |Copyright 1988,1989 Wolfram Research Inc.
  |
  |CallProcess::cppdied: Process sample has died.
  |
  |In[1]:= Quit
  |NeXT>

I also varied the Linking-options ( -l sys_s or -l NeXT_s ), 
but I cannot get expected result.  
My  Makefile for mathlink.c and sample.c are as follows:

  |CPATH=-c -bsd
  |LPATH= -lNeXT_s  # or -l sys_s
  |
  |sample: sample.o mathlink.o
  |	cc $(LPATH) -o sample sample.o mathlink.o
  |
  |sample.o: sample.c mathlink.h Makefile
  |	cc $(CPATH) sample.c
  |
  |mathlink.o: mathlink.c Makefile
  |	cc $(CPATH) mathlink.c

I also obtained  warning messages which I don't understand as follows: 


  |NeXT> make

  |cc -c -bsd sample.c
  |cc -c -bsd mathlink.c
  |mathlink.c: In function typelookup:
  |mathlink.c:166: warning: `typelookup' was declared implicitly `extern' 
  |and later `static'
  |mathlink.c: In function service_loop:
  |mathlink.c:178: warning: `service_loop' was declared implicitly `extern' and later
  | `static'
  |mathlink.c: In function rcvpkt:
  |mathlink.c:205: warning: `rcvpkt' was declared implicitly `extern' and later 
  |`static'
  |mathlink.c: In function sendbuf:
  |mathlink.c:215: warning: `sendbuf' was declared 
  |implicitly `extern' and later `static'
  |mathlink.c: In function sendpkt:
  |mathlink.c:235: warning: `sendpkt' was declared 
  |implicitly `extern' and later `static'
  |mathlink.c: In function docall:
  |mathlink.c:247: warning: `docall' was declared implicitly `extern' 
  |and later `static'   
  |mathlink.c: In function outtypename:
  |mathlink.c:533: warning: `outtypename' 
  |was declared implicitly `extern' and later `static'
  |cc -lsys_s -o sample sample.o mathlink.o
  |NeXT> 


   I also tried the same sample program appeared in the manual of the mathlink 
which I found in NeXT and I foundthat  the same error is happening. 
   Does anyone know how to use mathlink in NeXT?

                             D. Cai 



  • Prev by Date: Mathematica and printing on the PC
  • Next by Date: Transformation Rules via AlgebraicRules
  • Previous by thread: Mathematica and printing on the PC
  • Next by thread: Transformation Rules via AlgebraicRules