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