automake - How do I check for an unmangled C++ symbol when building a PHP extension? -
Depending on written in C ++ I have a PHP module, which established that C ++ library (Boost Dettaim) is.
Currently, my config.m4 file I'm checking for the library as follows:
LIBNAME = boost_date_time LIBSYMBOL = _ZN5boost9gregorian9bad_monthD0Ev PHP_CHECK_LIBRARY ($ LIBNAME, $ LIBSYMBOL ,, [AC_MSG_ERROR ([. Do lib try not got $ LIBNAME: sudo install apt-get libboost- Dev])], [-lstdc ++ -ldl]) now, It works in my current environment, but I am painfully aware that it will probably break on a different version of the library or compiler.
How do I get to understand the non-intercourse C ++ symbol? In
Edit:
I check realized scam name is terrible, but "nm-C" is not there a way to examine the symbol name given ( Such as: Promotion :: Gregory :: bad_month etc).
I got some gyration on automake command AC_LANG_CPLUSPLUS (), but I'm ot sure to n use it And whether it applies here.
You can see symbols to avoid the use of this unmangled. AC_TRY_COMPILE the same with:
LIBNAME = boost_date_time AC_MSG_CHECKING (Boost for) AC_TRY_COMPILE ([#include "Promote / DATE_TIME / Gregorian / greg_month.hpp"], [Promotion :: Gregorian :: bad_month * bm = new Boost :: Gregorian :: bad_month;], [AC_MSG_RESULT (yes)], [AC_MSG_ERROR (try [Lib $ LIBNAME not found: sudo apt-get install libboost-dev])])
Comments
Post a Comment