Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:4134 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 84833 invoked by uid 1010); 22 Aug 2003 20:28:28 -0000 Received: (qmail 84788 invoked from network); 22 Aug 2003 20:28:27 -0000 Received: from unknown (HELO adsl-209-204-144-251.sonic.net) (209.204.144.251) by pb1.pair.com with SMTP; 22 Aug 2003 20:28:27 -0000 Received: from [127.0.0.1] (helo=192.168.1.2) by adsl-209-204-144-251.sonic.net with smtp (Exim 4.20) id 19qIWR-0000gA-SW; Fri, 22 Aug 2003 13:28:35 -0700 Received: from 192.168.1.253 (SquirrelMail authenticated user mark) by 192.168.1.2 with HTTP; Fri, 22 Aug 2003 13:28:35 -0700 (PDT) Message-ID: <4043.192.168.1.253.1061584115.squirrel@192.168.1.2> In-Reply-To: <20030820145716.2919.qmail@pb1.pair.com> References: <4719.192.168.1.103.1061332762.squirrel@192.168.1.2> <20030820145716.2919.qmail@pb1.pair.com> Date: Fri, 22 Aug 2003 13:28:35 -0700 (PDT) To: jay@php.net Cc: internals@lists.php.net Reply-To: mes@zeroc.com User-Agent: SquirrelMail/1.4.0-1 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 X-Priority: 3 Importance: Normal Subject: Re: [PHP-DEV] Re: Support for C++ extension in UNIX builds From: mes@zeroc.com ("Mark Spruiell") > > fwiw, I've never had these problems with gcc's C++ compiler on Solaris when > building C++ extensions, and the final linking step is usually done by gcc, > not g++. When you do the linking, do you link to the stdc++ library? Unlike GCC, Sun's C and C++ compilers are independent entities, therefore you can't link a C++ program or shared library when the C compiler is driving the linker. It's also not possible to compile PHP's C code with Sun's C++ compiler. I guess we're a little spoiled by GCC. :) - Mark > J > > > Mark Spruiell wrote: > >> I've written a PHP5 extension in C++ that builds great on Linux with GCC, >> whether I compile it into PHP or build it as a shared library. >> >> On Solaris with Sun CC, however, I've had to manually edit the Makefile or >> the libtool script in order to successfully build my extension. When I >> compile the extension into PHP, I have to change $(CC) to $(CXX) in >> certain places in the Makefile. When I build it as a dynamic library, I >> have to edit libtool so that it uses $(CXX) and not ld to create the >> shared library. >> >> Am I overlooking some configuration step that eliminates the need to >> manually edit these files? >> >> Thanks, >> - Mark > > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > >