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" 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: References: 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: Cancel-Lock: sha1:q7zE/7esntQ5R/M/aLGWU41HGLs= Xref: csiph.com comp.lang.forth:16573 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 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