Bug #75618 [Com]: embed sapi can not compile
| From: | jsntzhuhu at gmail dot com | Date: | Mon, 04 Dec 2017 14:38:00 +0000 |
| Subject: | Bug #75618 [Com]: embed sapi can not compile | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-212905@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75618&edit=1
ID: 75618
Comment by: jsntzhuhu at gmail dot com
Reported by: jsntzhuhu at gmail dot com
Summary: embed sapi can not compile
Status: Open
Type: Bug
Package: Unknown/Other Function
Operating System: Linux Mint
PHP Version: 7.2.0
Block user comment: N
Private report: N
New Comment:
sorry, this is not problem , just !!! compile method !!!
gcc ukcframe.c -o ukcframe -Iphp7/include/php -Iphp7/include/php/main -Iphp7/include/php/Zend
-Iphp7/include/php/TSRM -Wall -g -lstdc++ -lphp7 -Lphp7/lib
It's ok .
cmd line 's order is wrong .
Previous Comments:
------------------------------------------------------------------------
[2017-12-04 08:45:15] jsntzhuhu at gmail dot com
Description:
------------
simple sapi code can't link.
same as https://bugs.php.net/bug.php?id=48911
Test script:
---------------
#include "sapi/embed/php_embed.h"
int main( int argc , char ** argv){
PHP_EMBED_START_BLOCK(argc,argv);
PHP_EMBED_END_BLOCK();
return 0;
}
gcc -Iphp7/include/php -Iphp7/include/php/main -Iphp7/include/php/Zend -Iphp7/include/php/TSRM -Wall
-g -lstdc++ -lphp7 -Lphp7/lib ukcframe.c -o ukcframe
Expected result:
----------------
compile success
Actual result:
--------------
ukcframe.c:6: undefined reference to `php_embed_init'
ukcframe.c:6: undefined reference to `executor_globals'
ukcframe.c:6: undefined reference to `executor_globals'
ukcframe.c:6: undefined reference to `executor_globals'
ukcframe.c:8: undefined reference to `executor_globals'
ukcframe.c:8: undefined reference to `executor_globals'
ukcframe.c:8: undefined reference to `php_embed_shutdown'
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75618&edit=1