Re: 2 problems with extension

From: Date: Thu, 12 Jun 2008 10:48:07 +0000
Subject: Re: 2 problems with extension
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-5514@lists.php.net to get a copy of this message
On 12.06.2008 13:05, Adam Klobukowski wrote:
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.
2) 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. -- Wbr, Antony Dovgal

« previous php.pecl.dev (#5514) next »