c++ - Compiling PHP on Windows with /MT -


i need link php statically project on working. in order this, believe need compile php /mt, appears being done in /md.

the real documentation have been able find on compiling php @ https://wiki.php.net/internals/windows/stepbystepbuild , not cover requirement.

can done, or incorrect in assumptions?

not sure why want this, can come pretty close building php static binary , using binary later c++ application. should portable , should meet requirements without linking application.

to this, need include --enable-static when configuring. example:

./configure --enable-static=yes \     --enable-fastcgi \     --enable-force-cgi-redirect \     --enable-discard-path \     --prefix=/server/php \     --exec-prefix=/server/php \     --with-config-file-path=/server/php \     --disable-all \     --enable-shared=no \     --enable-session \     --with-gd \     --with-zlib-dir \     --with-freetype-dir \     --enable-sockets     --with-freetype-dir=/usr/local 

you should add -all-static flag build_cgi in makefile. after run make , should static php binary. can use c++ project without external requirements it.

on other hand, if can meet requirements creating c++ php extension, should take @ php-cpp:

the php-cpp library c++ library developing php extensions. offers collection of documented , easy-to-use classes can used , extended build native extensions php.


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -