I have a third party C++ API that I need to use inside PHP. I do not have the source so I can not compile it for php. How can I get access to the library from PHP?
Thanks in advance,
Joe
C++ API wrapper
Moderator: General Moderators
Re: C++ API wrapper
If you can link it to a C program you can use it in PHP by writing an extension for it. All you need is header files for your compiled library (I assume you meant dynamic/static library by 'C++ Api'), you don't need the library's code.
Re: C++ API wrapper
I have the .hpp files and it is a dynamic library. Is there a way of creating the extension without having to write additional c++ code and compiling it?
Thanks,
Joe
Thanks,
Joe
Re: C++ API wrapper
No, extensions are libraries on itself and thus need to be compiled.jklovanc wrote:Is there a way of creating the extension without having to write additional c++ code and compiling it?