Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix missing win32/php_stdint.h when building for php 8.x on Windows, add Windows build instructions #232

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions DEVELOPERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,20 @@ line.
git clone https://github.com/SegFaulty/DocThor
php -d extension=modules/zmq.so DocThor/DocThor.php --sourceDir=./ zmq
```

## Windows Build Instructions (PHP 8.x)
* `git clone https://github.com/Microsoft/php-sdk-binary-tools`
* Open "Developer Command Prompt for VS2019"
* All commands listed below must be run using the VS2019 command prompt you just opened:
* cd into the directory you just cloned, and run `phpsdk-vs16-x64.bat`
* `phpsdk_buildtree phpdev`
* Download source code of the PHP version you're building for: https://windows.php.net/download/
* Extract the source code under `<php-sdk-binary-tools>/phpdev/vs16/x64/php-8.2.4-src` (replace php version with whatever version you downloaded)
* Download libzmq: https://github.com/zeromq/libzmq/releases (eg. libzmq-v142-x64-4_3_4.zip)
* Extract under `<php-sdk-binary-tools>/phpdev/vs16/x64/zmq`
* In that folder, rename libzmq-v142-mt-4_3_4.lib to libzmq.lib
* Clone this repo into `<php-sdk-binary-tools>/phpdev/vs16/x64/php-8.2.4-src/ext/zmq`
* `cd <php-sdk-binary-tools>/phpdev/vs16/x64/php-8.2.4-src`
* `buildconf`
* `configure --with-zmq="<php-sdk-binary-tools>/phpdev/vs16/x64/zmq,shared"`
* `nmake`
2 changes: 1 addition & 1 deletion php_zmq_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
# endif
#endif

#ifdef PHP_WIN32
#if (PHP_VERSION_ID < 80000) && defined(PHP_WIN32)
# include "win32/php_stdint.h"
#else
# include <stdint.h>
Expand Down