PHP extensions and C++

From: Date: Wed, 19 Feb 2003 02:26:31 +0000
Subject: PHP extensions and C++
Groups: php.dev 
Request: Send a blank email to php-dev+get-94339@lists.php.net to get a copy of this message
Hi, I'm trying to write a simple PHP extension that will wrap a C++ class. I have a test C++ program which exercises the class and works properly. I am trying to make the PHP extension code work, but I keep running into this error in VC++: DataStore.lib(FileSystemDataStore.obj) : error LNK2005: "void __cdecl operator delete(void *,void *)" (??3@YAXPAX0@Z) already defined in DataStore.obj This occurs only if I instantiate an object of my class (named FileSystemDataStore). #if 1 FileSystemDataStore *fsds = new FileSystemDataStore(fs_args); #endif Including this code causes the linkage error, and #if 0 this block will compile and link fine. I suspect the php glue code since my C++ test program compiles and links fine against the same .lib. Has anyone seen this error or have a suggestion for how to fix it? Thanks dave P.S - I'm not sure if this is the correct list to post this question on, so please let me know if I should repost it elsewhere.

« previous php.dev (#94339) next »