You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-users@xerces.apache.org by Matt England <me...@mengland.net> on 2005/08/22 22:02:45 UTC
How to eliminate .dll dependency on Windows?
Hello,
(My apologies in advance for a FAQ; after working with Xerces for months,
my developers don't have an answer for this, so I thought I'd ask; don't
see an immediate answer on the website, either.)
I manage a cross-platform C++ development project that uses Xerces (and
many other tools like MinGW, Boost, ACE, Qt, etc). Amongst all these
tools, Xerces is the one library for which we have yet to figure out how to
eliminate as an external library file. We have to continually include a
xerces-c_2_5_0.dll file in our binary distributions.
How can we avoid this in the future?
Will Xerces support a static-library link (such that the Xerces module
becomes embedded in our executable(s))?
If a static link, I'm concerned about the resulting size of the executable,
for the xerces-c_2_5_0.dll file is 4.5MB big, while our project's
executable is only 3MB big. Is there a way to static-link only the
portions/modules of the library we need?
Is there any other options besides static linking?
Thanks for any help,
-Matt
Re: How to eliminate .dll dependency on Windows?
Posted by Alberto Massari <am...@datadirect.com>.
Hi Matt,
At 07.46 23/08/2005 -0500, Matt England wrote:
>Hi Alberto,
>
>At 8/23/2005 02:45 AM, Alberto Massari wrote:
>>Hi Matt,
>>if you download the latest code base (for version 2.7) you can use
>>the solution file for Visual Studio .NET 2003 to build a static library.
>
>Will such a library work with MinGW?
No, it probably won't work; I doubt gcc can read libraries created by
cl. I just got the impression you were using MSVC on Windows.
If you have to use MinGW, you can try editing Makefile.incl and
replace the line
MAKE_SHARED = dllwrap --export-all-symbols --driver-name c++ ${LDFLAGS}
with
MAKE_SHARED = ${CC} -D${PLATFORM} ${LDFLAGS}
Alberto
>I've never tried doing something like this, but I'm skeptical about
>this working.
>
>We have not reason for which I'm aware that we can not go to 2.7.
>
>-Matt
>
>
>>If you have to stick with version 2.5, you can search the archives
>>for the instructions to build static libraries on Windows.
>>
>>Alberto
Re: How to eliminate .dll dependency on Windows?
Posted by Matt England <me...@mengland.net>.
Hi Alberto,
At 8/23/2005 02:45 AM, Alberto Massari wrote:
>Hi Matt,
>if you download the latest code base (for version 2.7) you can use the
>solution file for Visual Studio .NET 2003 to build a static library.
Will such a library work with MinGW?
I've never tried doing something like this, but I'm skeptical about this
working.
We have not reason for which I'm aware that we can not go to 2.7.
-Matt
>If you have to stick with version 2.5, you can search the archives for the
>instructions to build static libraries on Windows.
>
>Alberto
Re: How to eliminate .dll dependency on Windows?
Posted by Alberto Massari <am...@datadirect.com>.
Hi Matt,
if you download the latest code base (for version 2.7) you can use
the solution file for Visual Studio .NET 2003 to build a static library.
If you have to stick with version 2.5, you can search the archives
for the instructions to build static libraries on Windows.
Alberto
At 15.02 22/08/2005 -0500, Matt England wrote:
>Hello,
>
>(My apologies in advance for a FAQ; after working with Xerces for
>months, my developers don't have an answer for this, so I thought
>I'd ask; don't see an immediate answer on the website, either.)
>
>I manage a cross-platform C++ development project that uses Xerces
>(and many other tools like MinGW, Boost, ACE, Qt, etc). Amongst all
>these tools, Xerces is the one library for which we have yet to
>figure out how to eliminate as an external library file. We have to
>continually include a xerces-c_2_5_0.dll file in our binary distributions.
>
>How can we avoid this in the future?
>
>Will Xerces support a static-library link (such that the Xerces
>module becomes embedded in our executable(s))?
>
>If a static link, I'm concerned about the resulting size of the
>executable, for the xerces-c_2_5_0.dll file is 4.5MB big, while our
>project's executable is only 3MB big. Is there a way to static-link
>only the portions/modules of the library we need?
>
>Is there any other options besides static linking?
>
>Thanks for any help,
>-Matt