Building C++ extensions
| From: | Stut | Date: | Mon, 25 Sep 2006 21:09:55 +0000 |
| Subject: | Building C++ extensions | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-25827@lists.php.net to get a copy of this message | ||
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. -Stut