You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by "Pier P. Fumagalli" <pi...@betaversion.org> on 2001/08/12 02:04:52 UTC

Statically linking under Windows...

DOH! I can link easily to libapr.dll, (prepared thru nmake /f libapr.mak),
but, if I want to link to its static version (done with nmake /f apr.mak I
get all sorts of linking error... It seems that the shitty M$ linker cannot
find any of the APR symbols (which are present in apr.lib). Probably it's
because it "rewrites" all the function names to:

 __imp__apr_functionname(...)

Any clue on that? (BTW, the DLL is fine, so, don't worry about it too much!)

    Pier


Re: Statically linking under Windows...

Posted by "Pier P. Fumagalli" <pi...@betaversion.org>.
William A. Rowe, Jr. at wrowe@rowe-clan.net wrote:

> When you build with apr.mak, everything should be static.
> 
> So when you have sources that depend on static bindings to apr, you need to
> /D APR_DECLARE_STATIC, which takes out (with no pain) all of the dynlink
> fooness of the .dlls :)  See the httpd-2.0 support projects, such as ab.dsp.

I knew it was something I screwed up, but as always I'm too lazy to look
around :) :) :) Will give it a shot...
Thank youuuu! :)

    Pier


Re: Statically linking under Windows...

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
When you build with apr.mak, everything should be static.

So when you have sources that depend on static bindings to apr, you need to
/D APR_DECLARE_STATIC, which takes out (with no pain) all of the dynlink
fooness of the .dlls :)  See the httpd-2.0 support projects, such as ab.dsp.

Bill

----- Original Message ----- 
From: "Pier P. Fumagalli" <pi...@betaversion.org>
To: <de...@apr.apache.org>
Sent: Saturday, August 11, 2001 7:04 PM
Subject: Statically linking under Windows...


> DOH! I can link easily to libapr.dll, (prepared thru nmake /f libapr.mak),
> but, if I want to link to its static version (done with nmake /f apr.mak I
> get all sorts of linking error... It seems that the shitty M$ linker cannot
> find any of the APR symbols (which are present in apr.lib). Probably it's
> because it "rewrites" all the function names to:
> 
>  __imp__apr_functionname(...)
> 
> Any clue on that? (BTW, the DLL is fine, so, don't worry about it too much!)
> 
>     Pier
> 
>