Re: 2 problems with extension
| From: | Adam Klobukowski | Date: | Thu, 12 Jun 2008 11:47:10 +0000 |
| Subject: | Re: 2 problems with extension | ||
| References: | 1 2 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-5515@lists.php.net to get a copy of this message | ||
Antony Dovgal pisze:
On 12.06.2008 13:05, Adam Klobukowski wrote:Ok, not dynamically my mistake. So instead, I'd like to link with .a. What should I add to my config.m4?Hello I'm writing my custom extension, and I have 2 problems: 1) I'm including a third party library, but I failed to modify config.m4 to include it :(. Not I just compile it statically. This library is just /lib/libsomething.a, no fancy autotools macros and stuff. How can I link it dynamically with my extension?.a cannot be linked dynamically, it's a static library. You'll need .so to link it dynamically.
Ok, what does this mean for me? Adam Klobukowski2) I want to initialize some global structures in PHP_MINIT (this structure comes from 1) library), and use it in my functions. All operations on that structure are internally synchronized, so I do not have to worry with threads. Unfortunately, when I try it witch apache2, it segfaults. On the other hand, when I try php-cli it works like a charm.You probably have multithreaded Apache2 build.