On 26.09.2006 01:09, Stut wrote:
Ok, so I've built an extension that uses a C++ library. It compiles fine but the build system is insisting on linking with gcc no matter what I tell it. Is there some simple trick I'm missing as far as convincing it to use g++ goes?

Here is the config.m4 in case I've missed something in there...

PHP_ARG_ENABLE(mmsr, whether to enable mmsr support,
[  --enable-mmsr=dir       Enable mmsr support])

if test "$PHP_MMSR" != "no"; then
   PHP_ADD_LIBRARY_WITH_PATH(mmsr, "$PHP_MMSR")
   PHP_ADD_INCLUDE("$PHP_MMSR/MMSR")
PHP_NEW_EXTENSION(mmsr, mmsr.c "$PHP_MMSR/MMSR/mmsr_bridge.cpp", $ext_shared)
   PHP_REQUIRE_CXX()
fi

I had expected the PHP_REQUIRE_CXX() macro to trigger a change to the link command, but it does not seem to have done anything beyond influencing what is used to compile the extension itself.

PECL/rar is C++ (or sort of C++) extension, so you can use its config.m4 as an 
example.
Here it is: 
http://cvs.php.net/viewvc.cgi/pecl/rar/config.m4?revision=1.6&view=markup

--
Wbr, Antony Dovgal

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to