[sword-devel] PHP SWIG Bindings and Extension Development

Patrick Stephan pstephan1187 at gmail.com
Thu Apr 13 00:06:10 EDT 2023


Alright... So I've gotten a little bit farther...

I was missing the `libtoolize --force` command before autogen. After including that command and replacing the php4 references with php8 in the php.m4, Makefile.am, and Makefile.in, I no longer get the "No rule to make target 'phpswig'. Stop." error.

When I run the `make phpswig` command, this is what I get:
```
mkdir -p php
/usr/bin/swig -php -c++ -o php/Sword.cxx -I. -I/usr/include/sword ./sword.i
templates.i:3: Error: Unable to find 'std_list.i'
make: *** [Makefile:972: phpswig] Error 1
```

That `std_list.i` file appears to be a swig file that is in its python and perl files, but not in its php files. I imagine that is what is causing this error. Does anyone know how to overcome this?

- Patrick
On Apr 12, 2023 at 1:50 AM -0500, Peter von Kaehne <refdoc at gmx.net>, wrote:
> I am not on my computer and speak from old memory but there is a two-step for Perl so I guess that may be for php too .
>
>
>
> Sent from my phone. Please forgive misspellings and weird “corrections”
>
> > On 12 Apr 2023, at 06:46, Patrick Stephan <pstephan1187 at gmail.com> wrote:
> >
> >
> > Hello!
> >
> > First off, I want to thank everyone for their work in this project. It's an incredible work to make God's word more readily available.
> >
> > As the subject of the email suggests, I am trying to interface with the sword library with PHP. I am attempting to use the SWIG bindings provided, but there are no current PHP bindings provided. There does appear to be some older PHP 4 (PHP 8 is the current major version available) references in the Makefiles and configure file in `bindings/swig/package/` and a php4.m4 file. Attempting to run `make phpswig` (when you might run `make perlswig` according to the readme file in the swig directory) returns a "No rule to make target 'phpswig'. Stop." error. I have made some attempts to replace `php4` with `php8`, but that changes nothing. Anyway, I am attempting to create (or revive) PHP bindings for the sword library and would love some direction on where/how to get started. I have practically no experience with c/c++ or make files or swig, but if someone could give me a shove in the right direction, I think I can figure it out.
> >
> > Thank you everyone!
> >
> > - Patrick
> > _______________________________________________
> > sword-devel mailing list: sword-devel at crosswire.org
> > http://crosswire.org/mailman/listinfo/sword-devel
> > Instructions to unsubscribe/change your settings at above page
>
> _______________________________________________
> sword-devel mailing list: sword-devel at crosswire.org
> http://crosswire.org/mailman/listinfo/sword-devel
> Instructions to unsubscribe/change your settings at above page
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://crosswire.org/pipermail/sword-devel/attachments/20230412/6b4c8380/attachment.htm>


More information about the sword-devel mailing list