Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!apple!julius.cs.uiuc.edu!zaphod.mps.ohio-state.edu!think.com!linus!linus!wdh From: wdh@linus.mitre.org (W. Dale Hall) Newsgroups: comp.lang.prolog Subject: ARITY/PROLOG Summary: problems interfacing with C code Keywords: ARITY prolog, embedded C, stack use Message-ID: <126141@linus.mitre.org> Date: 13 Nov 90 18:51:41 GMT Reply-To: wdh@linus.UUCP (W. Dale Hall) Followup-To: comp.lang.prolog Distribution: na Organization: The MITRE Corporation, Bedford MA Lines: 24 Here's a problem I've encountered using ARITY/PROLOG, in trying to employ Turbo C (v2.0) to do some graphics output. I've gotten both the prolog code and C code to compile to .OBJ modules, and when I try to link, my linker complains that each module wants to set up its own stack, and says something like "duplicate stack" and refuses (I assume properly) to create an .EXE file. Oddly enough, when I write a small test program to see whether the problem is more basic (i.e., I have the C module simply do some arithmetic and return some value), everything is just hunky-dory. Apparently, my use of the stack is really the culprit. According to the ARITY manual, there is supposed to be a file called "arityc.c" which sets up memory usage (and which I hope does the identification of the prolog stack with the C stack, or at least makes the duplication somehow tolerable) for prolog and C. This file was supposed to be included with my UTIL disk, but it doesn't appear in either the 5.25" or the 3.5" version. Has anyone else faced/overcome this problem? I've honestly RTFM'ed until I can't, and don't have the ability (without a lot of intermediate bother) to contact the ARITY bbs. Any suggestions would be welcome. Dale.