TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 08-18-2010, 10:14 AM   #1 (permalink)
The Visitor
Newcomer 
 
Join Date: Aug 2010
Posts: 1
Thanks: 0
king011a is on a distinguished road
Default 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?
king011a is offline  
Reply With Quote
Old 08-22-2010, 03:48 PM   #2 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

Quote:
Originally Posted by king011a View Post
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.
__________________

Village Idiot is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't get PHP 5. to work? Newbie windows PHP guy DotNetTim Absolute Beginners 11 02-01-2013 11:02 AM
Developing PHP extensions on Windows with VC++ - problems an article posted here eugenio Advanced PHP Programming 4 04-24-2009 03:45 PM
No PHP extension in ZDE Orc General 4 02-10-2009 12:09 PM
PHP project for a business environment - ideas? MovingShadow General 2 09-01-2008 04:29 PM
Your favorite PHP extension? Kalle General 5 08-09-2008 07:05 PM


All times are GMT. The time now is 06:50 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design