Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:27890 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 57987 invoked by uid 1010); 7 Feb 2007 19:25:06 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 57972 invoked from network); 7 Feb 2007 19:25:06 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Feb 2007 19:25:06 -0000 Authentication-Results: pb1.pair.com header.from=antony@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=antony@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: antony@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from [212.25.124.162] ([212.25.124.162:22550] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 54/1D-18288-0972AC54 for ; Wed, 07 Feb 2007 14:25:05 -0500 Received: (qmail 15003 invoked from network); 7 Feb 2007 19:23:22 -0000 Received: from internal.zend.office (HELO ?127.0.0.1?) (10.1.1.1) by internal.zend.office with SMTP; 7 Feb 2007 19:23:22 -0000 Message-ID: <45CA278A.5050506@zend.com> Date: Wed, 07 Feb 2007 22:24:58 +0300 User-Agent: Thunderbird 2.0b2 (X11/20070116) MIME-Version: 1.0 To: Caroline Maynard CC: internals@lists.php.net, Edin Kadribasic References: <45C9B71C.4030806@zend.com> <45CA2032.2010205@php.net> In-Reply-To: <45CA2032.2010205@php.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] C++ in non-threaded PHP From: antony@zend.com (Antony Dovgal) On 02/07/2007 09:53 PM, Caroline Maynard wrote: >> Also, how to reproduce it? >> I compile C++ extensions quite often and do not see any problems. > > Well you need to have an extension which references CG() or EG() from > C++ and build it with --disable-zts. So, compiling the sdo extension, > which refers to, for example, EG(uninitialized_zval_ptr), the link step > gives: > > SDO_DataObject.obj : error LNK2001: unresolved external symbol > "__declspec(dllimport) struct _zend_executor_globals executor_globals" > (__imp_?executor_globals@@3U_zend_executor_globals@@A) > > Debug\php_sdo.dll : fatal error LNK1120: 1 unresolved externals > > because the references are getting mangled. Putting them inside extern > "C" fixes this. > > (my example was obviously on Windows, but the same should apply on *IX) Seems to be Windows specific - it works fine with ICC and GCC on Linux. Edin, could you please check this out? -- Wbr, Antony Dovgal