with that config.m4, running: % phpize && ./configure --enable-biac=shared && make
should yield this: /bin/bash <dir>/libtool --mode=compile g++ is that the case or not? dave -----Original Message----- From: Michel M. dos Santos [mailto:[EMAIL PROTECTED] Sent: Wednesday, March 05, 2003 1:04 PM To: Dave Viner; [EMAIL PROTECTED]; [EMAIL PROTECTED] Subject: Re: [PHP-DEV] Re: modules in c++ Yes. My config.m4: PHP_ARG_ENABLE(biac, for biac support,[ --enable-biac Enable biac support]) if test "$PHP_BIAC" != "no" ; then PHP_ADD_LIBRARY(stdc++) PHP_EXTENSION(biac,$ext_shared) PHP_REQUIRE_CXX() fi Michel M. dos Santos On Wednesday 05 March 2003 18:01, Dave Viner wrote: > do you have the PHP_REQUIRE_CXX() in your config.m4? > > dave > > > -----Original Message----- > From: Michel M. dos Santos [mailto:[EMAIL PROTECTED] > Sent: Wednesday, March 05, 2003 12:43 PM > To: [EMAIL PROTECTED]; [EMAIL PROTECTED] > Subject: Re: [PHP-DEV] Re: modules in c++ > > > > > J, > > First, thanks by your article. My original e first problem is : > > PHP Warning: Unable to load dynamic library > '/usr/lib/php4/20010901/biac.so' - /usr/lib/php4/20010901/biac.so: > undefined symbol: endl__FR7ostream in Unknown on line 0 > > The use of cout (in this case) result it. I try with std::cout or using > namespace std but not resolve. Linking with g++ the error dont occur. > > What is wrong ? > > Thanks a lot, > > Michel M. dos Santos > > On Wednesday 05 March 2003 17:23, J Smith wrote: > > That should still work fine, though, shouldn't it? I mean, the .so spit > > out > > > should be working properly. I just tested this with a C++ extension and > > while gcc was used by libtool for the linking, the extension works fine. > > > > If you really want the C++ compiler to do the linking, you can open up > > libtool file that's generated and edit the line that reads "CC=gcc" to > > say "CC=g++". I'm not sure if there's a better way to do this. At least, > > I haven't found one yet. If you find something that works a bit better, > > let me know and I'll update the article. > > > > J > > > > Michel M. Dos Santos wrote: > > > Hi, > > > > > > I've been trying use C++ within a PHP extension with help by document > > > in http://www.tutorbuddy.com/software/phpcpp/phpcpp/. > > > The instructions works fine but I have problems with linking objects. > > The > > > > script libtool links objects with gcc and not with g++ and the moment > > of > > > > creation of the dinamic library .so gcc is used and not g++. > > > > > > See: > > > > > > /bin/sh /root/biac_php/teste/libtool --mode=link gcc -I. > > > ^^^^^^^^^^^^^^^ > > > -I/root/biac_php/teste/ -I/root/biac_php/teste/main > > > -I/root/biac_php/teste -I/usr/include/php4 -I/usr/include/php4/main > > > > -I/usr/include/php4/Zend -I/usr/include/php4/TSRM -DHAVE_CONFIG_H -g -O2 > > > > > -o teste.la > > > -avoid-version > > > -module -rpath /root/biac_php/teste/modules teste.lo > > > > > > gcc -shared teste.lo -Wl,-soname -Wl,teste.so -o .libs/teste.so > > > ^^^^^^^^^^^ > > > > > > Thanks, > > > > > > Michel M. dos Santos -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php