Open subabrain opened 4 years ago
ok .. i dont get this with this version:
git clone https://github.com/CopernicaMarketingSoftware/PHP-CPP.git
this works :)
sorry i am wrong - it doesnt work :/
here one error: ... EDIT:
error: expected initializer before ‘__THROW’ extern void *alloca (size_t size) THROW;
....
please help :)
Thanks Bruno - ill give a try :)
ok .. but i dont understand whats this feature has to say:
This release is mainly a bugfix release
i think its because of a compiler error ....
hi,
here the .dll from phpcpp and the .lib - compiled with php 7.4.0 / x86 and phpcpp :)
EDIT: now it should work :)
Greets Robert
Man! This is a great news. I'll try it as i can. Thank you
Hi,
sorry there are 4 dependencies which are not working (but the rest :) ) -i dont know why - i will check today evening ..
Greets Robert
Hi,
ok i got it - its working now .... :)
Greets Robert
i will upload a .sln Project here later ;)
Greets Robert
ok - my example extension works - without errors with phpcpp (with windows) :)
i now try the php-gtk3 ;)
Greets Robert
This is the best news on this year
If you compile on windows, i'll back on the project, creating an auto-generator to create all the methods, and will be my year end project
Please, try to write steps to compile php-cpp on windows, 'ill help alot
This is the best news on this year
If you compile on windows, i'll back on the project, creating an auto-generator to create all the methods, and will be my year end project
Please, try to write steps to compile php-cpp on windows, 'ill help alot
Hi Bruno,
EDIT:
you have to rename the "string.h" file in the "zend" phpcpp folder to f.e. "strings.h" - because if you dont do this there are some errors because conflicts of the system "string.h" file ...... and then rename this string.h to strings.h when needed :)
but i will try but not with fixed sourcecode - this would be too much - but i will upload the .sln File with the fiexed files here later:
make a new empty c++ project in visual studio (i took version 2022 community)
download the phpcpp sourcecode (i took the newest on github)
download the php sourcecode (i took php 7.4.0 from gihtub releases)
download the php binaries for windows (i took php 7.4.0 x86 non thread safe):
https://windows.php.net/downloads/releases/archives/php-7.4.0-nts-Win32-vc15-x86.zip
put them extracted in a folder...
now choose your environment in visual studio to "Release" and "X86" (not tested with X64)
please add then all files from the "zend" directory of phpcpp as .cpp files to your project ..
now make the include paths in "properties" of the project to the following php paths in visual studio: ... php_source_path\php-src-php-7.4.0 php_source_path\php-src-php-7.4.0\main php_source_path\php-src-php-7.4.0\Zend php_source_path\php-src-php-7.4.0\TSRM php_source_path\php-src-php-7.4.0\ext php_source_path\php-src-php-7.4.0\build\main php_source_path\php-src-php-7.4.0\build\Zend ...
And important - do the following with the preprocessor definitions:
_WIN32 _WINDOWS NDEBUG ZEND_DEBUG=0 _CRT_SECURE_NO_WARNINGS BUILDING_PHPCPP ZEND_WIN32_KEEP_INLINE PHP_WIN32 ZEND_WIN32 _USE_32BIT_TIME_T _MSC_VER=1933 PHP_COMPILER_ID="VC15"
Now - set the Linker options to:
php7.lib
then set the path of the Linker to:
php_source_path\php-7.4.0-nts-Win32-vc15-x86\dev
so the php7.lib located in the "dev" folder ...
now compile the project - BUT you have to choose the version of build to plattform Visual Studio 2017 (v141)
and choose the c++ compiler to "iso17"
so now if its compiled you can use it for developing extensions from php in windows :)
the sln project with all dependencies are comming later ;)
Greets from Germany Robert
Hi,
the Problem in phpgtk3 for windows is the mixture of c and c++ - its not easy 😢
but not for me 😄
Greets Robert
Hi,
here the .sln file for compiling phpcpp under windows ....
EDIT:
https://1drv.ms/u/s!AifVi84AXOwIhZRdiS8uKQUCQy5i9Q?e=EpJkE5
NOTE:
You have to adjust the c++ files path ... or just add them by yourself :)
HAVE FUN!
Greets Robert
@scorninpc - maybe you can support me in compiling php-gtk3 for windows with help of my compiled phpcpp version ...
Thanks and Greets! Robert
For sure Robert! Open a issue on the php-gtk3 project
Hello,
i tried now several days to compile php-cpp in Debian with MingW (newest Version). And there are Errors like:
...
/usr/i686-w64-mingw32/include/phpcpp/inivalue.h:17:21: error: variable ‘Php::PHPCPP_EXPORT Php::IniValue’ has initializer but incomplete type class PHPCPP_EXPORT IniValue
...
And if i try to compile with g++ - it works..
Please help me!
Thanks!