Reputation: 934
I wanted to test the php-cpp possibilities but while using "make" it throughs "php.h" missing at me:
g++ -Wall -c -g -std=c++11 -fpic `php-config --includes` -o zend/base.o zend/base.cpp
In file included from zend/base.cpp:8:
zend/includes.h:35:10: fatal error: 'php.h' file not found
#include <php.h>
^
1 error generated.
make: *** [zend/base.o] Error 1
How can I fix it? I`m on osx10.9.3 and if it's relevant I'm using xampp for php projects. The documentation of php-cpp http://www.php-cpp.com/documentation/install.
Upvotes: 3
Views: 2685
Reputation: 343
First check if your "php" package is installed ... if not please install it.
Now get your php version with "$php -v" then maybe the "php.h" it already in your "php/main/" folder "/usr/include/php/main/" and put the "php.h" from there in the "usr/include/" directory.
If you cant find the "php.h" file there - Just download the php sourcecode from github but you have to notice that you download the version which is similar to yours "$php -v".
Here go to the "main" directory in the php sourecode. There the is the "php.h" file located - now just put it in your "usr/include/" path.
Upvotes: 1
Reputation: 934
Oke, apparently what you need to do is download the php source from: - nl3.php.net/downloads.php Copy the "zend" folder from the package and paste it to the php-cpp folder (delete the old one and rename the new one to "zend").
Upvotes: 3