You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xalan.apache.org by "Lewis G. Pringle, Jr." <le...@RecordsForLiving.com> on 2008/12/30 22:22:38 UTC

Xalan static lib build for Win32?

Folks:

            I’ve finally got the trunk xalan code building as a static link library with Xerces 3.0. I’d be more than happy to pass along (for someone else to checkin) my changes to the vcproj (etc) files (I’ve only done VC8).

 

            I wonder why this isn’t already supported? There didn’t appear to even be any #defines or anything to control building a static link library.

 

            What I did was pattern (in terms of #defines) the XALAN library code after what is done in Xerces for static libraries – I defined a constant XALAN_STATIC_LIBRARY to mimic the behavior of the xerces define XERCES_STATIC_LIBRARY.

 

            So far – in my very limited testing – Xalan does appear to work fine as a static link library.

 

            I also cleaned up the vcproj files slightly – to make supporting additional configurations easier. I’d recommend using the variable $(Configuration) instead of an explicit ‘Debug’ or ‘Release’ in path names. Doing that – made it easier to clone ‘Debug’ configuration into ‘Static Debug’. Also – I had to fix a path-quoting bug in a custom rule file (to support ‘Static Debug’ – like xerces – as opposed to ‘StaticDebug”).

 

 

                                    Lewis.

 


Re: Xalan static lib build for Win32?

Posted by David Bertoni <db...@apache.org>.
Lewis G. Pringle, Jr. wrote:
> Folks:
> 
>             I’ve finally got the trunk xalan code building as a static 
> link library with Xerces 3.0. I’d be more than happy to pass along (for 
> someone else to checkin) my changes to the vcproj (etc) files (I’ve only 
> done VC8).
You can always create a Jira issue and attach the diffs.

>             I wonder why this isn’t already supported? There didn’t 
> appear to even be any #defines or anything to control building a static 
> link library.
No one's ever asked before, as far as I can remember.

>             What I did was pattern (in terms of #defines) the XALAN 
> library code after what is done in Xerces for static libraries – I 
> defined a constant XALAN_STATIC_LIBRARY to mimic the behavior of the 
> xerces define XERCES_STATIC_LIBRARY.
> 
>             So far – in my very limited testing – Xalan does appear to 
> work fine as a static link library.
> 
>             I also cleaned up the vcproj files slightly – to make 
> supporting additional configurations easier. I’d recommend using the 
> variable $(Configuration) instead of an explicit ‘Debug’ or ‘Release’ in 
> path names. Doing that – made it easier to clone ‘Debug’ configuration 
> into ‘Static Debug’. Also – I had to fix a path-quoting bug in a custom 
> rule file (to support ‘Static Debug’ – like xerces – as opposed to 
> ‘StaticDebug”).
I'd rather avoid paths with spaces in them if possible.  I did some 
cleanup of the project files recently, and I believe you only need to 
change one field when cloning a configuration now.

Dave