Newsgroups: php.internals,php.internals Path: news.php.net Xref: news.php.net php.internals:4511 php.internals:4512 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 43740 invoked by uid 1010); 17 Sep 2003 15:01:15 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 43655 invoked by uid 1007); 17 Sep 2003 15:01:14 -0000 To: internals@lists.php.net, Wez Furlong Message-ID: <3F687746.8010208@cipherquest.com> Date: Wed, 17 Sep 2003 17:01:26 +0200 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5b) Gecko/20030901 Thunderbird/0.2 X-Accept-Language: en-us, en MIME-Version: 1.0 CC: jay@php.net, internals@lists.php.net References: <20030917141743.65402.qmail@pb1.pair.com> <20030917142722.84139.qmail@pb1.pair.com> <033101c37d2a$b6bbdf50$0702a8c0@TITAN> In-Reply-To: <033101c37d2a$b6bbdf50$0702a8c0@TITAN> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Posted-By: 81.240.1.132 Subject: Re: [PHP-DEV] Re: C++ extension question From: iore@cipherquest.com (Igal Ore) you are right , and for those cases there a preprocessor protection #ifndef DO_NOT_MAKE_BOBO #define DO_NOT_MAKE_BOBO class Foo{ Foo(){...} ~Foo(){...} }; #endif isn't it? Wez Furlong wrote: > This sounds like the "rookie" mistake of declaring your functions inline in > the class definition in the header files, and then including those headers > in multiple files. > > eg: foo.h: > > class Foo { > Foo() { ... } > ~Foo() { ... } > }; > > foo.cpp: > #include "foo.h" > > bar.cpp: > #include "foo.h" > > == linker problems. > > --Wez. > > >>I'm assuming "delete" isn't a function but the C++ operator delete. You're >>probably #including the same file more than once, but I doubt it's in > > Zend. > >>If all else fails, you can try passing "/FORCE" to the linker options and >>it'll try to force the linkage. It might result in a broken binary, > > though. > >>Igal Ore wrote: >> >> >>>I'm receiving this >>>php_TPKCS12.obj : LNK2005 error: _delete already defined in cert.obj >>>php_TPKCS12.obj : warning LNK4006: _delete already defined in cert.obj; >>>second definition ignored