You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Neil Sherman <ns...@aimltd.co.uk> on 2001/11/30 10:25:42 UTC

Dynamically linking xerces while the program is running

Hi all!

I would like to be able to make use of the Xerces parser without linking 
the DLL when the program is compiled.  What I need is to be able to only 
link in the DLL when a portion of my code is executed.  The reason for not 
wanting to import it at compile time is that my application has many 
different uses, and for the majority of the time the use of Xerces will not 
be required.  Therefore I need my application to function even if the 
Xerces DLL is not present.  Having the DLL loaded into memory at 
application startup seems very wasteful if its not required for the 
majority of the functionality!

Can anyone provide some (simple!!) examples of how this can be acheived??

Many thanks

Neil Sherman

P.S. - Im using Borland C++



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Transcoding Strings

Posted by Jorge Pozo Ramirez <j....@externo.mju.es>.
    Hi there.

    I'm having troubles with the following:

        I have a XML document, UTF-8 formatted, with special characters
transcoded to my local codepage.

    (as I am spanish, the characters ñ á é í ó ú are coded as ñ  á  é  í
ó  ú ).

        How can I get that chars correctly decoded by Xerces?. (If I load
the document, instead of the original chars Xerces returns me the coded
ones, even if I use the transcode method of the DOMString Object).

Thank you.

Jorge



**********************************************************************
Este mensaje ha sido analizado con una herramienta de
deteccion de virus para su seguridad.

Ministerio de Justicia
www.mju.es
**********************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


Statically Linking Xerces

Posted by Martin Kalen <ma...@todaysystems.com.au>.
Jorge,
    I didn't see a follow-up on this one and since the question pops
up once in a while, I though it might be worth re-iterate what others
have said on the matter...

> As I've see, it Xeces cannot be linked in static mode at
compile-time.
> Is there any way of doing it?.

The configure-framework does not support this directly, but you can
create your own archive containing the object files that normally go
inte a shared archive.

Quoting Dee Jay Randall <ra...@circularreasoning.com> from Tuesday,
September 18, 2001:
DJR> What I have done in the past was to take all the .o
DJR> files and stuff them in a libxerces-c1_4_0.a library.
DJR> cd $XERCES_ROOT/obj/SOLARIS
DJR> ar r libxerces-c1_4_0.a *.o

> If not, how can I link statically the rest of my program, (the rest
of
> the libraries can be linked with the -static flag of GNU GCC), and
let only
> Xerces as required external library?

This should not be a problem either, just use something like:
gcc -o <my_appn> <my_main>.c <static_lib1>.a
<static_lib2>.a -L$XERCESCROOT/lib -lxerces-cX_Y

Good luck,
    Martin

--
Martin Kalen
Software Engineer
TODAY Systems, Inc.
http://www.todaysystems.com.au/
Tel +61-3-9536 3900 - Fax +61-3-9536 3901


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


And now Statically Linking Xerces

Posted by Jorge Pozo Ramirez <j....@externo.mju.es>.
    Hi, people.

    I'm working with  Xerces 1.5.2 parser under SCO Unix, and I would like
to compile my program, (which uses many other libraries besides Xerces - C),
statically, so there is no need of distribute the libraries with the
executable file.
    As I've see, it Xeces cannot be linked in static mode at compile-time.
Is there any way of doing it?.

    If not, how can I link statically the rest of my program, (the rest of
the libraries can be linked with the -static flag of GNU GCC), and let only
Xerces as required external library?

Thanks.

Jorge

Jorge Pozo Ramírez
Accenture
Technology Consulting Services
Government GMU
email: jorge.pozo.ramirez@accenture.com
**************************************************
Subdirección General de Informática
- Ministerio de Justicia -
email: j.pozo@externo.mju.es
tel: 913902646



**********************************************************************
Este mensaje ha sido analizado con una herramienta de
deteccion de virus para su seguridad.

Ministerio de Justicia
www.mju.es
**********************************************************************

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org


RE: Dynamically linking xerces while the program is running

Posted by Evert Haasdijk <ev...@zukkespijkers.nl>.
Neil,

Check out Project|Options|DLLs to delay load

That's what you want, I think.

Evert

> -----Original Message-----
> From: Neil Sherman [mailto:nsherman@aimltd.co.uk]
> Sent: Friday, November 30, 2001 10:26 AM
> To: 'xerces-c-dev@xml.apache.org'
> Subject: Dynamically linking xerces while the program is running
> 
> 
> Hi all!
> 
> I would like to be able to make use of the Xerces parser without linking 
> the DLL when the program is compiled.  What I need is to be able to only 
> link in the DLL when a portion of my code is executed.  The 
> reason for not 
> wanting to import it at compile time is that my application has many 
> different uses, and for the majority of the time the use of 
> Xerces will not 
> be required.  Therefore I need my application to function even if the 
> Xerces DLL is not present.  Having the DLL loaded into memory at 
> application startup seems very wasteful if its not required for the 
> majority of the functionality!
> 
> Can anyone provide some (simple!!) examples of how this can be acheived??
> 
> Many thanks
> 
> Neil Sherman
> 
> P.S. - Im using Borland C++
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> 
> 
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org