Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:4133 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 73900 invoked by uid 1010); 22 Aug 2003 20:19:55 -0000 Received: (qmail 73879 invoked from network); 22 Aug 2003 20:19:54 -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:19:54 -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 19qIO9-0000fZ-U9; Fri, 22 Aug 2003 13:20:01 -0700 Received: from 192.168.1.253 (SquirrelMail authenticated user mark) by 192.168.1.2 with HTTP; Fri, 22 Aug 2003 13:20:01 -0700 (PDT) Message-ID: <3963.192.168.1.253.1061583601.squirrel@192.168.1.2> Date: Fri, 22 Aug 2003 13:20:01 -0700 (PDT) To: "Sascha Schumann" Cc: "PHP Internals List" 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] Support for C++ extension in UNIX builds From: mes@zeroc.com ("Mark Spruiell") >> 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. > > *.cpp files are automatically compiled using $(CXX). Make > sure that you use the sanctioned suffix. Right, my C++ source files are being compiled correctly, the problem is with linking. >> 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. > > libtool 1.4 does not support building DSOs in a portable way for any language but C. Try libtool 1.5. I installed libtool 1.5, but it causes PHP builds to fail for other reasons, so I haven't been able to verify whether it enables a successful build of my extension as a shared library. - Mark