php-opencv icon indicating copy to clipboard operation
php-opencv copied to clipboard

After compile dll error

Open tarasfrompir opened this issue 5 years ago • 10 comments

When i cheked .dll file in php i get error

Warning: PHP Startup: Unable to load dynamic library 'opencv' (tried: C:\www\php-sdk-binary-tools\phpdev\vc15\x64\php\x64\Debug_TS\opencv (═х эрщфхэ єърчрээ√щ ьюфєы№.), C:\www\php-sdk-binary-tools\phpdev\vc15\x64\php\x64\Debug_TS\php_opencv.dll (═х эрщфхэ єърчрээ√щ ьюфєы№.)) in Unknown on line 0 But file exists.

tarasfrompir avatar Mar 21 '19 22:03 tarasfrompir

Do you use compiled PHP references or other PHP on your system?

hihozhou avatar Mar 22 '19 04:03 hihozhou

I use compiled php which is compiled with opencv. I use this manual - https://hihozhou.com/blog/2018/09/27/window-compile-php-extensions.html. I get error when check - php -m. Can you share .dll library?

tarasfrompir avatar Mar 22 '19 05:03 tarasfrompir

@tarasfrompir Attempt to add enable-debug when using the configure command

buildconf
configure --disable-all --enable-debug --enable-cli --with-opencv=shared
nmake

I found compilation errors without adding the --enable-debug parameter, and I'm trying to fix this problem.

hihozhou avatar Apr 04 '19 12:04 hihozhou

Спасибо. Жду.

tarasfrompir avatar Apr 04 '19 12:04 tarasfrompir

I found the same build problem. https://github.com/phpv8/v8js/issues/325

hihozhou avatar Apr 04 '19 13:04 hihozhou

need to edit 3 files in MVStudio. This is i do. but i have a error. when compile File needs to edit - C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\include\chrono, C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\include\complex, C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\include\string

tarasfrompir avatar Apr 04 '19 18:04 tarasfrompir

How to edit, I don't understand what you mean. I found the difference between debug and non-debug when compiling configure image

hihozhou avatar Apr 07 '19 11:04 hihozhou

@tarasfrompir Look here., he can make string error correction.But I still don't understand the error. Do you know the reason? https://github.com/phpv8/v8js/blob/php7/config.w32#L53

ADD_FLAG("CFLAGS_OPENCV", "/D _STRING_");

before: image

after: image

hihozhou avatar Apr 09 '19 15:04 hihozhou

https://drive.google.com/file/d/196rdzUDf7wa5-pg9L-voFivLLcW0n4q2/view?usp=sharing replace this files in path - C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Tools\MSVC\14.16.27023\include i edit his and delete the blocks from files

tarasfrompir avatar Apr 09 '19 16:04 tarasfrompir

when i correct the files - i found a problem in files // files need to chek #include "source\opencv2\core\opencv_persistence.h" #include "source\opencv2\opencv_objdetect.h" #include "source\opencv2\opencv_videoio.h" #include "source\opencv2\opencv_ml.h" #include "source\opencv2\core\opencv_type.h" #include "source\opencv2\core\opencv_mat.h" whot a problem - i dont know

tarasfrompir avatar Apr 13 '19 07:04 tarasfrompir