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


Groups > comp.lang.forth > #16573

Re: Create Shared Library For Linux

Path csiph.com!usenet.pasdenom.info!gegeweb.org!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail
From "David N. Williams" <williams@umich.edu>
Newsgroups comp.lang.forth
Subject Re: Create Shared Library For Linux
Date Mon, 22 Oct 2012 08:31:54 -0500
Organization University of Michigan
Lines 32
Message-ID <k63hs3$o7$1@dont-email.me> (permalink)
References <eb25b5b4-fd42-4545-ba30-454623c97622@googlegroups.com>
Reply-To williams@umich.edu
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
Injection-Date Mon, 22 Oct 2012 13:31:47 +0000 (UTC)
Injection-Info mx04.eternal-september.org; posting-host="13d7fa7dac3eca64e3bcb5afe465bf38"; logging-data="775"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18QxCE1EU/fo3s8LpuJgjsb"
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:16.0) Gecko/20121010 Thunderbird/16.0.1
In-Reply-To <eb25b5b4-fd42-4545-ba30-454623c97622@googlegroups.com>
Cancel-Lock sha1:q7zE/7esntQ5R/M/aLGWU41HGLs=
Xref csiph.com comp.lang.forth:16573

Show key headers only | 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