forked from wpj16/php-opencv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcompile_for_windows_eng.txt
61 lines (29 loc) · 2.56 KB
/
compile_for_windows_eng.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
------------------------------------------------ -------------------------------------------------- ----
CODE CHANGES:
config.w32
php_opencv.h
source/opencv2/core/opencv_mat.cc
source/opencv2/opencv_imgproc.cc
-------------------------------------------------- -------------------------------------------------- -----------------------
#### 1° ####
TOOLS:
Visual studio 17 and c/c++ compiler, Windows Arch 64x, PHP 8.0 or higher
-------------------------------------------------- -------------------------------------------------- -----------------------
#### 2° ####
DEPENDENCES:
Visual studio 17 and c/c++ compiler
OPENCV project installed on the windows machine with all modules ( dll ) and supported by php_opencv.
https://github.com/spmallick/learnopencv/tree/master/Install-OpenCV-Windows-exe
#### 3° ####
PHP ENVIRONMENT:
Manual to prepare environment and build PHP https://wiki.php.net/internals/windows/stepbystepbuild_sdk_2
The php_opencv must be compiler as a PECL extension, after the steps to prepare the build environment on windows.
-------------------------------------------------- -------------------------------------------------- ----------------------
#### 4° ####
Building PECL extensions
Add the folder ( pecl ) at the same level as the folder ( php-src ) where the pecl extensions will be, in that same folder you must place the php_opencv project to compile with php.
In the root of the pecl folder, clone the php_opencv repository, and edit the opencv version in the PHP_OPENCV_VERSION variable, in the php_opencv.h file
In the root of the php-src folder, Run buildconf --force, to reload the settings
In the root of the php-src folder, Run configure --help , an option --with-opencv should appear, this option should be used when compiling php
In the root of the php-src folder, configure --with-curl --with-opencv --enable-cli --enable-pdo --with-pdo-firebird --with-pdo-mysql --with-pdo-pgsql --with-pdo-sqlite --with-tidy --with-password-argon2 --with-sodium --enable-sockets --with-pgsql --with-openssl --enable-mbstring --enable-mbregex --with-ldap --with-imap --with-gmp --with-gettext --enable-ftp --enable-fileinfo --with-ffi --with-bz2 --enable-phpdbg --enable-phpdbgs --enable-embed --with-all-shared --enable-sanitizer --with-qdbm --with-db --with-lmdb --enable-intl --with-oci8-19 --with-snmp --with-sqlite3 --with-config-file-scan-dir --enable-exif --with-mysqli --enable-soap --enable-bcmath --enable-calendar --enable-ctype --with-readline --enable-tokenizer --enable-zip --enable-shmop
In the root of the php-src folder, Run nmake snap