extension trouble

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 ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-24-2006
stef
 
Posts: n/a
Default extension trouble

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",
&parameter) == FAILURE) {
return;
}

RETURN_LONG(parameter);
}

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 08:07 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0