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

Can it run on Windows?

Open 54huige opened this issue 6 years ago • 4 comments

Can it run on Windows?

54huige avatar Dec 06 '18 11:12 54huige

It should.

dstogov avatar Dec 06 '18 11:12 dstogov

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

SerafimArts avatar Jul 08 '19 02:07 SerafimArts

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

stefanak-michal avatar Nov 14 '19 13:11 stefanak-michal

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

ghostjat avatar Nov 14 '19 15:11 ghostjat