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

Reply via email to