Another prob with PHP4 modules written in C++

From: Date: Wed, 22 Mar 2000 15:43:25 +0000
Subject: Another prob with PHP4 modules written in C++
Groups: php.version4 
Request: Send a blank email to php-version4+get-12494@lists.php.net to get a copy of this message
Hi, Wew, It's not that easy. Another Prob. Now I have a function checking the Number of arguments and converting the first one to a string: DLEXPORT extern "C" void mytest(INTERNAL_FUNCTION_PARAMETERS) { pval *arg; int arg_count; arg_count=ARG_COUNT(ht); if (arg_count!=1 || getParameters(ht,arg_count,&arg)==FAILURE) { WRONG_PARAM_COUNT; } convert_to_string(arg); [ ... ] } If I compile this function (without extern "C") with a C-compiler, the resulting library is working. But if I compile this function (with extern "C") with a C++-compiler, PHP tells me: Unable to load dynamic library..... undefined symbol: wrong_param_count__Fv Looks like this symbol is defined in the file libphp4.so (The Apache PHP-Module). I am really stuck now. There must be a way to use these functions. Any hints? Or better: Any example module written in C++? Bye K

« previous php.version4 (#12494) next »