TalkPHP

TalkPHP (http://www.talkphp.com/forums.php)
-   Advanced PHP Programming (http://www.talkphp.com/advanced-php-programming/)
-   -   PHP Extension : How to use EG macro in windows development environment (http://www.talkphp.com/advanced-php-programming/5548-php-extension-how-use-eg-macro-windows-development-environment.html)

king011a 08-18-2010 10:14 AM

PHP Extension : How to use EG macro in windows development environment
 
PHP Extension : How to use EG macro in windows

My extension used ZEND_API call_user_function_ex like this:

if(call_user_function_ex(EG(function_table), NULL, function_name, &retval, 1, params, 0, NULL TSRMLS_CC) == FAILURE) { zend_error(E_ERROR, "Function call failed"); RETURN_FALSE; }

The extension compiled with g++ works well in Linux.

When I build it with visual studio 2008, the compiler show me error msg like this:

error LNK2001: unresolved extenal symbol _executor_globals_id

I Saw the zend macro EG used executor_globals_id and the dynamic library php5ts.dll export the symbol executor_globals_id with the tool Dependency Walker. but i can`t find the symbol _executor_globals_id.

What should i do?

Village Idiot 08-22-2010 03:48 PM

Quote:

Originally Posted by king011a (Post 30908)
PHP Extension : How to use EG macro in windows

My extension used ZEND_API call_user_function_ex like this:

if(call_user_function_ex(EG(function_table), NULL, function_name, &retval, 1, params, 0, NULL TSRMLS_CC) == FAILURE) { zend_error(E_ERROR, "Function call failed"); RETURN_FALSE; }

The extension compiled with g++ works well in Linux.

When I build it with visual studio 2008, the compiler show me error msg like this:

error LNK2001: unresolved extenal symbol _executor_globals_id

I Saw the zend macro EG used executor_globals_id and the dynamic library php5ts.dll export the symbol executor_globals_id with the tool Dependency Walker. but i can`t find the symbol _executor_globals_id.

What should i do?

I dont know anything about the libraries you are using, but unresolved external symbol generally means that it found something in a header file but could not find it in any liked files. Are you sure you are linking everything correctly?

If it is not in the DLL you looked in you may have an outdated version of the DLL. Make sure that the DLL you are using is the same version as the header file.


All times are GMT. The time now is 11:19 PM.

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0