Compiling C++ modules
| From: | mike | Date: | Sun, 26 Mar 2000 07:57:34 +0000 |
| Subject: | Compiling C++ modules | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-12622@lists.php.net to get a copy of this message | ||
hi,
I'm writing a module to interface CORBA objects using C++ Builder. My
problem is that when I try to include php.h and other headers into my C++
source I get errors regarding the usage of 'extern' and not 'extern
"C"'.
I created the following solution:
extern "C" {
#include <php.h>
...
}
The problem is that some headers define functions/globals with extern only
which seems to override my solution.
Questions:
1. Why not change the headers to support C++ ? (I think 'extern "C"' should
do).
2. Is there a fast solution to remedy this problem except of creating my own
C source that would interface C-module to C++ code ?
3. Is there any reference for creating modules ? The documentation is OK but
not enough. I'm trying to write the modules for PHP4...
tnx,
mike.