该问题的解决方案是更改用于设置 php 扩展的 config.m4 文件,使其包含对使用PHP_ADD_LIBRARY_WITH_PATH
宏而不是宏的omniORB库的引用PHP_ADD_LIBRARY
,尽管这些库位于默认的 /usr/lib64 文件夹中.
我将整个文件作为工作参考。
dnl PHP extension definition written in C++ that uses the omniORB libraries
PHP_ARG_ENABLE(php_midas, whether to enable midas extension, [ --enable-php-midas Enable PHP Midas extension])
if test "$PHP_MIDAS" != "no"; then
dnl -- Add support for standard C++ runtime
PHP_ADD_LIBRARY_WITH_PATH( stdc++, /usr/lib64/, PHP_MIDAS_SHARED_LIBADD)
dnl -- Incldue the omniORB libraries
PHP_ADD_LIBRARY_WITH_PATH(omniCodeSets4, /usr/lib64/, PHP_MIDAS_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH(omniConnectionMgmt4, /usr/lib64/, PHP_MIDAS_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH(omniDynamic4, /usr/lib64/, PHP_MIDAS_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH(omniORB4, /usr/lib64/, PHP_MIDAS_SHARED_LIBADD)
PHP_ADD_LIBRARY_WITH_PATH(omnithread, /usr/lib64/, PHP_MIDAS_SHARED_LIBADD)
dnl -- Our extension consists of two cpp files
PHP_NEW_EXTENSION(php_midas, php_midas.cpp coordinatesConverterSK.cpp, $ext_shared)
PHP_SUBST(PHP_MIDAS_SHARED_LIBADD)
dnl -- Declare C++ extension
PHP_REQUIRE_CXX()
fi