Re: Compiling the XQuery extension on windows
| From: | William Candillon | Date: | Tue, 28 Jul 2009 10:53:05 +0000 |
| Subject: | Re: Compiling the XQuery extension on windows | ||
| References: | 1 2 | Groups: | php.pecl.dev |
| Request: | Send a blank email to pecl-dev+get-6544@lists.php.net to get a copy of this message | ||
Hello,
The extension compiles fine but I have linking problems.
My config.w32 looks like this:
ARG_ENABLE("zorba_api", "Zorba support", "yes");
if(PHP_ZORBA_API == "yes")
{
if (CHECK_LIB("zorba_simplestore.lib", "zorba", PHP_ZORBA_API) &&
CHECK_HEADER_ADD_INCLUDE("zorba/zorba/zorba.h", "CFLAGS", "zorba;" +
php_usual_include_suspects)) {
EXTENSION("zorba_api", "zorba_api_wrap.cpp", null, "/D
ZORBA_API_EXPORTS");
AC_DEFINE("HAVE_ZORBA_API", 1, "Zorba support");
if (!PHP_ZORBA_API_SHARED) {
ADD_DEF_FILE("ext\\zorba\\php_zorba.def");
}
} else {
WARNING("Zorba support can't be enabled, Zorba is missing")
PHP_ZORBA_API = "no"
}
}
What is the /D ZORBA_API_EXPORTS option ? I just cut & past it from
other config.w32 files.
The configure operation works fine:
Checking for library zorba_simplestore.lib ... ..\deps\lib\zorba_simplestore.lib
Checking for zorba/zorba/zorba.h ... ..\deps\include
Enabling extension ext\zorba [shared]
Then it compiles fine but I get linking errors:
Creating library Release_TS\php_zorba_api.lib and object Release_TS\php_zorba
_api.exp
zorba_api_wrap.obj : error LNK2019: unresolved external symbol "__declspec(dllim
port) public: __thiscall zorba::Item::Item(void)" (__imp_??0Item@zorba@@QAE@XZ)
referenced in function __wrap_new_Item
I guess it's because I don't understand the /D ZORBA_API_EXPORTS option.
Any lead for me ?
Best regards,
William
On Mon, Jul 27, 2009 at 11:17 PM, Keisial<keisial@gmail.com> wrote:
> William Candillon wrote:
>> Hello,
>>
>> I'm the maintainer of the XQuery package on PECL
>> (http://pecl.php.net/package/Zorba) and I would to provide binaries
>> for it on windows.
>> What is the best way for me to achieve that ? How do I write the
>> config.w32 file for my extension ? Do I need anything else ?
>> I was able to setup a proper environment to compile php on windows and
>> I would really love to be able to compile this extension on windows.
>>
>> Best regards,
>>
>> William
>>
> You just need to create a config.w32 file that produces equivaleent
> funcitonality to config.m4
> I recommend you take as the base the config.w32 file of another
> extension also using C++
>
>
>