php-ffi
php-ffi copied to clipboard
Can it run on Windows?
Can it run on Windows?
It should.
I'm not sure. I tried on several different libraries, everywhere one and the same error
Fatal error: Uncaught FFI\Exception: Failed loading 'xxxx.dll'
While on the Internet I found only one single example that worked before, but now it is impossible to reproduce: https://hotexamples.com/ru/examples/-/FFI/-/php-ffi-class-examples.html
PHP 7.4.0-dev (cli) (built: Jul 8 2019 01:26:59) ( NTS Visual C++ 2019 x64 )
Copyright (c) The PHP Group
Zend Engine v3.4.0-dev, Copyright (c) Zend Technologies
Same issue here, not working on windows. I've tried to FFI::load() on ".h" file and also I tried to use FFI::cdef() on ".dll" file.
Result is always FFI\Exception "Failed loading <path>"
.
PHP 7.4.0-dev (cli) (built: Nov 13 2019 05:33:53) ( ZTS Visual C++ 2017 x64 )
Copyright (c) The PHP Group
Zend Engine v3.4.0-dev, Copyright (c) Zend Technologies
It is working on my system for following DLLs Scintilla Gtk Tk Opencv
Your dll dir must be define in system path. As well as the main dll must be in php root dir Eg. Php |_dll_libs/ |_php.exe