I have compiled a PHP Extension Module. in the extension module, I need to call another dynamic library and write it myself. In Linux

Source: Internet
Author: User
I have compiled a PHP Extension Module. in the extension module, I need to call another dynamic library and write it myself. In Linux, there are two dynamic libraries, one for sqlite and the other for postgresql. The two dynamic library interfaces are the same. Another PHP Extension Module calls the dynamic library of sqlite or the dynamic library of postgresql. In Windows, you can write a PHP extension module by yourself. in the extension module, you need to call another dynamic library, which is also written by yourself. In Linux
This is the case.
There are two dynamic libraries, one for sqlite and the other for postgresql. The two dynamic library interfaces are the same.
Another PHP Extension Module calls the dynamic library of sqlite or the dynamic library of postgresql.
Windows is normal. the corresponding lib will be found during the link, and sqlite or postgresql can be called.
However, in Linux, when compiling the PHP extension module, you only need to find the header file instead of the dynamic library. Compilation is successful, but an error occurs during running. How can this problem be solved.
------ Solution --------------------
First ldd to see if your extensions have found dynamic libraries.
If you can add the dynamic library search path in ld. so. conf

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.