# linking with VS.NET: executor_globals_id is an unresolved external symbol

- Thread: https://externals.io/message/8234
- Original archive: https://news-web.php.net/php.internals/8234
- Started by David Sklar on 2004-02-27T16:48:11+00:00
- Messages: 1
- Reply by email to internals@lists.php.net
- More for agents: search with https://externals.io/search.md?q={query} · JSON API at https://externals.io/api · documentation at https://externals.io/llms.txt

---

## #8234 — David Sklar — 2004-02-27T16:48:11+00:00

URL: https://externals.io/message/8234#8234

Using Visual Studio.NET, I can build PHP fine using the php5ts
project/solution.

I have a problem, however, with another project I've added to the
solution which is a custom extension with no external (to PHP) library
dependencies. It was working (compiling, linking, and then being loaded
into PHP and run) just fine. However, when I added a call to
call_user_function_ex() in the extension, it wouldn't link anymore. I
get this error on linking:

error LNK2001: unresolved external symbol _executor_globals_id

I am calling call_user_function_ex() like this:

res = call_user_function_ex(EG(function_table), NULL,
                                    callback_func,
                                    &callback_retval,
                                    3,
                                    callback_params,
                                    0, `NULL` TSRMLS_CC);

so it seems that the executor_globals_id symbol comes from the use of
EG(function_table). The file with the call_user_function_ex() call
includes "zend_globals.h" which has the "extern int executor_globals_id"
statement in the #ifdef ZTS clause.

The extension compiles and links and runs just fine on Linux (presumably
because ZTS isn't defined.)

Is this something anyone else has run into? I can provide my .vcproj
file if that's helpful.

Thanks,
David
