#39522 [Bgs]: PHP's header files are unusable for C++ extensions

From: Date: Wed, 15 Nov 2006 10:10:58 +0000
Subject: #39522 [Bgs]: PHP's header files are unusable for C++ extensions
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-105009@lists.php.net to get a copy of this message
ID: 39522 Updated by: tony2001@php.net Reported By: phoemix at harmless dot hu Status: Bogus Bug Type: Compile Failure Operating System: freebsd6, linux (but irrelevant) PHP Version: 5.2.0 New Comment: I your previous post you were talking about *header*, while this is not what GCC says. I don't know what is in your .cc file and what is in your header, as you didn't show me anything except for a few lines. Please ask any questions related to custom module development in pecl-dev@lists.php.net, this is not a support forum, but a bug tracking system. Previous Comments: ------------------------------------------------------------------------ [2006-11-15 10:03:01] phoemix at harmless dot hu it _do_ has the extern "C". read my previous post please. i have pasted the way i include it, it's in an extern "C" block. let me quote my previous post: [2006-11-15 09:53:25] phoemix at harmless dot hu --- chop with axe here --- i have this in my header file: extern "C" { #include "php.h" #include "php_ini.h" #include "SAPI.h" #include "ext/standard/info.h" #include "ext/standard/head.h" } --- chop with axe here --- now, where is the extern "C" missing? i see it there. please double-check my previous post ------------------------------------------------------------------------ [2006-11-15 10:01:11] tony2001@php.net .. and it's apparently missing extern "C" { } block. No bug -> bogus. ------------------------------------------------------------------------ [2006-11-15 09:59:33] phoemix at harmless dot hu no, sorry, that's a source file. it includes that headers from php ------------------------------------------------------------------------ [2006-11-15 09:57:59] tony2001@php.net >i have this in my header file >In file included from /usr/local/include/php/main/php.h:242, is this the header file? -----> from phpext/phpfuncs.cc ------------------------------------------------------------------------ [2006-11-15 09:53:25] phoemix at harmless dot hu i have this in my header file: extern "C" { #include "php.h" #include "php_ini.h" #include "SAPI.h" #include "ext/standard/info.h" #include "ext/standard/head.h" } and when i compile it i have these errors: g++ -c -O2 -march=pentium4 -ggdb -W -Wall -pedantic -pipe -I/usr/local/include -fpic -DCOMPILE_DL_POLYLOOK=1 -Idbapi/ -Iinclude/ /var/jails/httpdtest/usr/local/bin/php-config --includes -o phpext/obj/phpfuncs.o phpext/phpfuncs.cc In file included from /usr/local/include/php/main/php.h:242, from phpext/phpfuncs.cc:7: /usr/local/include/php/main/snprintf.h:138: error: expected `,' or `...' before "num" /usr/local/include/php/main/snprintf.h:139: error: ISO C++ forbids declaration of `wide_int' with no type /usr/local/include/php/main/snprintf.h:144: error: expected `,' or `...' before "num" /usr/local/include/php/main/snprintf.h:145: error: ISO C++ forbids declaration of `u_wide_int' with no type gmake: *** [phpext/obj/phpfuncs.o] Error 1 and: g++ -c -O2 -march=pentium4 -ggdb -W -Wall -pedantic -pipe -I/usr/local/include -fpic -DCOMPILE_DL_POLYLOOK=1 -Idbapi/ -Iinclude/ /var/jails/httpdtest/usr/local/bin/php-config --includes -o phpext/obj/phpfuncs.o phpext/phpfuncs.cc In file included from /usr/local/include/php/main/php_streams.h:104, from /usr/local/include/php/main/php.h:408, from phpext/phpfuncs.cc:7: /usr/local/include/php/main/streams/php_stream_filter_api.h:66: error: comma at end of enumerator list gmake: *** [phpext/obj/phpfuncs.o] Error 1 ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/39522 -- Edit this bug report at http://bugs.php.net/?id=39522&edit=1

« previous php.bugs (#105009) next »