Compiling Win32 extensions (VC++)
| From: | Jeff Beidler | Date: | Thu, 07 Apr 2005 20:34:34 +0000 |
| Subject: | Compiling Win32 extensions (VC++) | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-25814@lists.php.net to get a copy of this message | ||
Hello,
I am trying to compile Doru Petrescu's Upload Progress Meter extension on Win32. (See http://pdoru.from.ro/upload-progress-meter.)
This is a great extension, it works very well... on linux, for which it was designed.
I am using MS Visual Studio (Visual C++ 6.0) as my build environment, set up as described in the
tutorial at http://www.devnewz.com/2002/0909.html. When trying
to compile, I get the message: "error C2065: 'tsrm_ls' : undeclared
identifier." This is somewhere in PHP's TSRM (Thread Safe Resource Manager) code. As I
understand it, all Windows PHP extensions must be "thread safe." If I remove the
"ZTS=1" from the preprocessor directives, the module will compile nicely into a .dll
file... but PHP won't load with it enabled. I imagine this is because I removed the thread
safe stuff in order to make it compile.
Anyone have any ideas on how to get the darn thing to compile in such a manner that will make PHP
accept it and load the module?
Help greatly appreciated,
Jeff