I am reading the Extending and Embedding PHP, but I account some errors with hashtable,even my code is actually the same as the sample code.
I have codes like this: PHP_FUNCTION(wps_close) { FILE* fp; zval* file_handler; if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r", &file_handler) == FAILURE) { RETURN_FALSE; } ZEND_FETCH_RESOURCE(fp, FILE*, &file_handler, -1, PHP_WPS_HASH_DESCRIPTOR_RES_NAME, le_sample_descriptor); zend_hash_index_del(&EG(regular_list), Z_RESVAL_P(file_handler)); RETURN_TRUE; } the code above is just the same as the sample code except the variable name , which called file_resource in the sample and named file_handler in my code , i can't find more difference more than that. But the code above compile faild with visual studio 2008. It says: 1>wps_hash.c 1>..\..\..\wps_hash\wps_hash.c(149) : warning C4996: 'fopen': This function or variable may be unsafe. Consider using fopen_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. 1> C:\Program Files\Microsoft Visual Studio 9.0\VC\include\stdio.h(237) : see declaration of 'fopen' 1>Linking... 1> Creating library C:\Documents and Settings\wps2000\Desktop\wps2000\wps_hash\Release\wps_hash.lib and object C:\Documents and Settings\wps2000\Desktop\wps2000\wps_hash\Release\wps_hash.exp 1>wps_hash.obj : error LNK2001: unresolved external symbol _executor_globals_id 1>C:\Documents and Settings\wps2000\Desktop\wps2000\wps_hash\Release\wps_hash.dll : fatal error LNK1120: 1 unresolved externals thanks