You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by bj...@cogitoinc.com on 2005/02/05 01:56:54 UTC

Shared or static library?

I'm just starting a multi-platform project (linux/win32) and I'm setting up to use APR.

On http://apr.apache.org/compiling_unix.html it says "As of this writing, APR is not quite ready to be installed as a system-wide shared library; it currently works best when tied directly to the application using it."

I interpreted this to mean that I should use APR as a static library rather than shared.  Even though this was an the unix build page, I've assumed it applies to all platforms (bad assumption?).  I've tried to initially build apr-1.1.0 on windows using the provided .dsw/.dsp files.  I get unknown symbol link errors with the static library even after defining APR_DECLARE_STATIC and APU_DECLARE_STATIC, yet I can successfully build and link to the shared library (.dll).  I've seen around the net lib*.so's and *.rpm's that appear to be ready for use as a system-wide shared library.  

Is the web page out of date (or am I just suffering stupid user errors)?  Does it apply to all platforms?  Is there a preference for using APR as a shared or static library?

Thanks,
--the walrus