Re: Shared Extensions
| From: | bob majdak jr | Date: | Wed, 20 Jun 2007 02:40:05 +0000 |
| Subject: | Re: Shared Extensions | ||
| References: | 1 2 | Groups: | php.gtk.dev |
| Request: | Send a blank email to php-gtk-dev+get-3896@lists.php.net to get a copy of this message | ||
LOL.
The way I was told, it used to work fine in Linux until someone went and fixed it for Windows, so I went and told the group of kids behind the drugstore who are anti-microsoft-without-a-cause the whole story without thinking twice.
<winky face emoticon>
I have crafted a fix which, "works on my box" without touching the main source at all, just the m4 file so Windows would not be affected. However Anant had some concerns about it that were over my head since it works without problems here, I will let him express those. It is attached to this thing :p
I have only actually tested it on GtkExtra, GtkSourceView, and LibSexy. However as I already told Anant we also need to modify it so that the extensions are not "extra.so", "sourceview.so" and "libsexy.so" as they need some sort of prefix. I believe windows already does this.
- bob.
Steph Fox wrote:
Hi Anant, What took you guys so long anyway? ;) COMPILE_DL_* is the PHP version of events, and PHP-GTK is a PHP extension. So of course, when writing my first and only extension, I copied the #define format I saw in php_gtk.c. After all, "It works on my box..." Please don't commit any fixes without testing on both platforms first, in case that's been inadvertently used to distinguish between platforms somewhere deep in the source. But it's just a case of testing for extname=="php-gtk" in the EXTENSION() definition, where it says: cflags = "/D COMPILE_DL_" + EXT + "2 /D " + EXT + "_EXPORTS=1" + cflags; and adapting accordingly. - StephHi All, Bob (Majdak Jr.) has figured out why shared extensions haven't been working on *nix all this while, and I've traced the issue to this commit: http://cvs.php.net/viewvc.cgi/php-gtk/ext/libglade/php_libglade.c?r1=1.7&r2=1.8 That commit changes #ifdef PHP_GTK_COMPILE_DL_LIBGLADE to #ifdef COMPILE_DL_LIBGLADE2. Apparently the windows build system defines COMPILE_DL_<extension>2, but the *nix system is still defining PHP_GTK_COMPILE_DL_<extension> whenever a shared extension is to be built. This has carried on into all the other extensions too, with the result being that none of them build as a shared .so on *nix. Can we agree on a single #define please? :) Cheers, -- Anant -- PHP-GTK Development Mailing List (http://gtk.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Attachment: [text/x-patch] phpgtk2-linuxsharedext.diff