Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #16573

Re: Create Shared Library For Linux

From "David N. Williams" <williams@umich.edu>
Newsgroups comp.lang.forth
Subject Re: Create Shared Library For Linux
Date 2012-10-22 08:31 -0500
Organization University of Michigan
Message-ID <k63hs3$o7$1@dont-email.me> (permalink)
References <eb25b5b4-fd42-4545-ba30-454623c97622@googlegroups.com>

Show all headers | View raw


On 10/21/12 9:59 PM, deech wrote:> Hi all,
 > I'm looking for a Forth with which I can make a shared library
 > on Linux that can be called from C. The couple I've seen so far,
 > Reva [1] and kForth [2] can only call C libraries. Do you know
 > of any that have what I'm looking for?

All Forth words in pfe are in shared libraries, with the default
build.

   http://pfe.sourceforge.net/
   http://pfe.svn.sourceforge.net/viewvc/pfe/trunk/pfe-33/
   http://pfe.svn.sourceforge.net/viewvc/pfe/branches/dnw/

My branch in the last link above is AFAIK the more up to date.
Instructions for using that repository are here:

   http://www.umich.edu/~williams/archive/forth/pfe/pfefromsvn.html

To call from C, you need to include the pfe includes:

   #include <pfe/pfe-base.h>

I think that's described, along with how to call words,
somewhere in the documentation at the first link above, but ask
if it's not easy to find.

Examples for the reverse direction, binding C libraries as pfe
Forth words, are under "pfe bindings" here:

   http://www.umich.edu/~williams/archive/forth/gmpfr/

-- David

Back to comp.lang.forth | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Create Shared Library For Linux deech <aditya.siram@gmail.com> - 2012-10-21 19:59 -0700
  Re: Create Shared Library For Linux "David N. Williams" <williams@umich.edu> - 2012-10-22 08:31 -0500
  Re: Create Shared Library For Linux Bernd Paysan <bernd.paysan@gmx.de> - 2012-10-22 18:16 +0200
  Re: Create Shared Library For Linux The Beez <the.beez.speaks@gmail.com> - 2012-10-25 06:55 -0700
  Re: Create Shared Library For Linux krishna.myneni@ccreweb.org - 2012-10-30 17:57 -0700

csiph-web