This is a discussion on extension trouble within the PHP Language forums, part of the PHP Programming Forums category; Hello, Could you help me, please... I'm trying to compile manually a simple extensions (the example given on PHP ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hello,
Could you help me, please... I'm trying to compile manually a simple extensions (the example given on PHP site) under OS-X 10.4 intel with gcc4.0 My commands are : $ gcc -fPIC -DCOMPILE_DL=1 -I/usr/local/include -I../TSRM -I. -I.. -I../main -I../Zend -c -o test.o test.c $ gcc -L/usr/local/lib -dynamiclib -o mylib.dylib ./test.o and I get: ld: Undefined symbols: _zend_parse_parameters I don't understand ! thanx source of php site: #include "php.h" /* declaration of functions to be exported */ ZEND_FUNCTION(first_module); /* compiled function list so Zend knows what's in this module */ zend_function_entry firstmod_functions[] = { ZEND_FE(first_module, NULL) {NULL, NULL, NULL} }; /* compiled module information */ zend_module_entry firstmod_module_entry = { STANDARD_MODULE_HEADER, "First Module", firstmod_functions, NULL, NULL, NULL, NULL, NULL, NO_VERSION_YET, STANDARD_MODULE_PROPERTIES }; /* implement standard "stub" routine to introduce ourselves to Zend */ #if COMPILE_DL_FIRST_MODULE ZEND_GET_MODULE(firstmod) #endif /* implement function that is meant to be made available to PHP */ ZEND_FUNCTION(first_module) { long parameter; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", ¶meter) == FAILURE) { return; } RETURN_LONG(parameter); } |
![]() |
| Thread Tools | |
| Display Modes | |
|
|