Re: Linking C++ extensions

From: Date: Tue, 01 Jan 2008 00:42:11 +0000
Subject: Re: Linking C++ extensions
References: 1 2 3  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-5012@lists.php.net to get a copy of this message
On 01.01.2008 03:35, Jon Parise wrote: >> And you're linking against libstdc++, right? > > I wasn't adding it explicitly, no. > > I just tried adding libstd++ via PHP_ADD_LIBRARY(...), and that > appears to also solve my problem (without having to add the additional > parameter to PHP_NEW_EXTENSION). Well, that was apparently the problem. > I'm not sure which approach is preferable, however. It looks like the > C++ standard library is available under various names: libC, libg++, > libstdc++, and libcxx. It seems like it would be best to let the > system's C++ tool chain include the appropriate library itself by > explicitly linking using $(CXX) instead of $(CC), which is what the > sixth parameter to PHP_NEW_EXTENSION controls. Well, that's what I use for PECL/rar and I haven't heard any complaints yet. http://cvs.php.net/viewvc.cgi/pecl/rar/config.m4?revision=1.6&view=markup -- Wbr, Antony Dovgal

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