Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:4110 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 2924 invoked by uid 1007); 20 Aug 2003 14:57:16 -0000 Message-ID: <20030820145716.2919.qmail@pb1.pair.com> To: internals@lists.php.net Reply-To: jay@php.net Mail-Copies-To: jay@php.net Date: Wed, 20 Aug 2003 10:57:15 -0400 References: <4719.192.168.1.103.1061332762.squirrel@192.168.1.2> Lines: 26 User-Agent: KNode/0.7.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Posted-By: 216.94.11.234 Subject: Re: Support for C++ extension in UNIX builds From: jay@php.net (Jay Smith) 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? 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