Re: how to call c/c++ (BIG PROBLEM)

From: Date: Fri, 01 Dec 2000 13:25:38 +0000
Subject: Re: how to call c/c++ (BIG PROBLEM)
References: 1  Groups: php.dev php.general 
Request: Send a blank email to php-dev+get-39787@lists.php.net to get a copy of this message
----- Original Message ----- From: forestwater <forestwater@sina.com> > Can php call c and c++ program? > And how to call c and c++ program? Well, yes you can. And I can tell you how you should do it. But it's not running on my system. :( If you find out how, please tell me. The main page for that info you can find it at: http://www.zend.com/apidoc/ for short: go to your php source dir. change to ./ext and execute there ./ext_skel --extname=<yourmodulename> after that you will have a folder in the ext dir with your suggested name. And you will also have a C code skeleton for the interface of php. testing it: cd .. ./buildconf - this will create a new configure file ./configure - build your new Makefile make - compile the whole thing voila - that should be all ---- should but in my case - it's not working :( it didn't linked to the main program nor it has a .so file you can change the configure file if test "" = "shared"; then to this if test "shared" = "shared"; then (And this is surly not the right way to toggle to a .so library) to get a .so file but this will not be accepted by php. --> Warning: Invalid library (maybe not a PHP library) 'first_module.so' in /home/pub/granit/first_module.php on line 2 IF ANYBODY HAS AN IDEA ---> HELP!!! I'm going crazy here, I don't know what I can do different. Thomas

« previous php.dev (#39787) next »