Newsgroups: comp.lang.prolog,comp.lang.c
Path: cantaloupe.srv.cs.cmu.edu!das-news2.harvard.edu!news2.near.net!howland.reston.ans.net!Germany.EU.net!EU.net!ieunet!news.ul.ie!indigo!brehonyt
From: brehonyt@ul.ie (Tom Brehony)
Subject: Problem porting Quintus Prolog/C system from Unix to DOS. Help required!!
Message-ID: <brehonyt.179.0129EF4D@ul.ie>
Lines: 39
Sender: usenet@ul.ie
Nntp-Posting-Host: 136.201.8.21
Organization: University of Limerick, Ireland
X-Newsreader: Trumpet for Windows [Version 1.0 Rev B final beta #1]
Date: Wed, 7 Dec 1994 17:04:06 GMT
Xref: glinda.oz.cs.cmu.edu comp.lang.prolog:11911 comp.lang.c:119644

If this question is inappropriate for these newsgroups I apologise, but these 
groups seem the most relevantto me.

I have developed a system using ANSI C, Quintus Prolog version 3.1.4 under
SunOS 4.1.3. The system consists of a system originally developed under
ANSI C, to which has been added a Prolog interface, allowing the system to
be converted into a UNIX shared object file.

This shared object file can then be imported into Prolog program. No
problems here as this is relatively straight forward.

The problem comes when I try to port this system to the PC. I have Watcom
C/C++ 32 version 9.5a development system, and the PC version of Quintus
Prolog. 

Section 8-1 of the DOS Quintus Prolog manual says that it is not possible
to dynamically load foreign C code into the Quintus Prolog/386 Development
or Runtime System. It states that it is however possible to access such
code if the C code has been statically linked into the application using
QLD.EXE

Now the problem.

The system I am developing has 15 C object files, which were linked into a
shared object file. What is the DOS equivalent of a shared object file? If
there isn't a direct equivalent how do I get around this problem.

I don't wish to create an executable at this stage. What I want to be able
to do is to create a new Prolog developement system which includes my C
functions.

How do I get around the shared object problem? Any help would be appreciated.

Tom.

--
Tom Brehony             Email:   brehonyt@ul.ie
Uni. Limerick           Address: CSIS Dept,University of Limerick, Ireland 
Fax: +353-61-330876     Tel:     +353-61-202748
