You are here: extension trouble « PHP Programming Language « IT news, forums, messages
extension trouble

Posted by stef on 11/07/25 11:48

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);
}

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация