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 Doug Chinnery <do...@zadall.com> on 2003/04/04 03:00:42 UTC

Cannot open library

I've downloaded, built and installed the xerces-c library.  As
expected, it created 3 shared libraries in my /usr/local/lib
directory, called:

libxerces-c.so@
libxerces-c.so.22@
libxerces-c.so.22.0

When I try to run my program I get the following error:

dynamic linker : ./CreateDOMDocument : error opening libxerces-c2_2_0.so

As you can see, this library doesn't exist among the libs that were
created.  I made a link to another library called libxerces-c2_2_0.so,
and I got rid of the dynamic linker error, but now my code dumps core.

Any thoughts on why the dynamic linker would be looking for modules in
a library that doesn't exist? Here's my short program in case there's
something really wacked out with the code itself:
-------------------------------------------------------------------

#include <xercesc/dom/DOM.hpp>
#include <xercesc/util/PlatformUtils.hpp>

XERCES_CPP_NAMESPACE_USE

int main (int argc, char *argv[])
{
   XMLPlatformUtils::Initialize();
   DOMImplementation *impl =  DOMImplementationRegistry::getDOMImplementation(XMLString::transcode ("LS"));
   DOMDocument* doc = impl->createDocument(0,  // root element namespace URI.
                                           XMLString::transcode("head"),
                                           0); // document type object (DTD).
   return (0);
}
--------------------------------------------------------------------

Thanks in advance for any help you can provide.

Doug Chinnery

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


Re: Cannot open library

Posted by PeiYong Zhang <pe...@ca.ibm.com>.
Doug,

    If that is the case, u may open a bugzilla report on this, the more
specific info
provided (platform, version, the step u go through, etc), the quicker we can
have it resolved.

Rgds,
PeiYong

----- Original Message -----
From: "Doug Chinnery" <do...@zadall.com>
To: <xe...@xml.apache.org>
Sent: Friday, April 04, 2003 1:09 PM
Subject: Re: Cannot open library


>
> => Did you add the path where the libarries located to LD_LIBRARY_PATH (
> => or SHLIB_PATH)?
>
> Yes.  My LD_LIBRARY_PATH is set up correctly.  What makes me think
> that there's something up with the shared library is that if I make a
> static xerces-c library, I don't get this problem.
>
>
> => > I've downloaded, built and installed the xerces-c library.  As
> => > expected, it created 3 shared libraries in my /usr/local/lib
> => > directory, called:
> => >
> => > libxerces-c.so@
> => > libxerces-c.so.22@
> => > libxerces-c.so.22.0
> => >
> => > When I try to run my program I get the following error:
> => >
> => > dynamic linker : ./CreateDOMDocument : error opening
libxerces-c2_2_0.so
> => >
> => > As you can see, this library doesn't exist among the libs that were
> => > created.  I made a link to another library called
libxerces-c2_2_0.so,
> => > and I got rid of the dynamic linker error, but now my code dumps
core.
> => >
> => > Any thoughts on why the dynamic linker would be looking for modules
in
> => > a library that doesn't exist? Here's my short program in case there's
> => > something really wacked out with the code itself:
> => > -------------------------------------------------------------------
> => >
> => > #include <xercesc/dom/DOM.hpp>
> => > #include <xercesc/util/PlatformUtils.hpp>
> => >
> => > XERCES_CPP_NAMESPACE_USE
> => >
> => > int main (int argc, char *argv[])
> => > {
> => >    XMLPlatformUtils::Initialize();
> => >    DOMImplementation *impl =
> => DOMImplementationRegistry::getDOMImplementation(XMLString::transcode
> => ("LS"));
> => >    DOMDocument* doc = impl->createDocument(0,  // root element
namespace
> => URI.
> => >
XMLString::transcode("head"),
> => >                                            0); // document type
object
> => (DTD).
> => >    return (0);
> => > }
> => > --------------------------------------------------------------------
> => >
> => > Thanks in advance for any help you can provide.
> => >
> => > Doug Chinnery
> => >
> => > ---------------------------------------------------------------------
> => > 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
> =>
> =>
>
> ---------------------------------------------------------------------
> 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


Re: Cannot open library

Posted by Doug Chinnery <do...@zadall.com>.
=> Did you add the path where the libarries located to LD_LIBRARY_PATH (
=> or SHLIB_PATH)?

Yes.  My LD_LIBRARY_PATH is set up correctly.  What makes me think
that there's something up with the shared library is that if I make a
static xerces-c library, I don't get this problem.


=> > I've downloaded, built and installed the xerces-c library.  As
=> > expected, it created 3 shared libraries in my /usr/local/lib
=> > directory, called:
=> >
=> > libxerces-c.so@
=> > libxerces-c.so.22@
=> > libxerces-c.so.22.0
=> >
=> > When I try to run my program I get the following error:
=> >
=> > dynamic linker : ./CreateDOMDocument : error opening libxerces-c2_2_0.so
=> >
=> > As you can see, this library doesn't exist among the libs that were
=> > created.  I made a link to another library called libxerces-c2_2_0.so,
=> > and I got rid of the dynamic linker error, but now my code dumps core.
=> >
=> > Any thoughts on why the dynamic linker would be looking for modules in
=> > a library that doesn't exist? Here's my short program in case there's
=> > something really wacked out with the code itself:
=> > -------------------------------------------------------------------
=> >
=> > #include <xercesc/dom/DOM.hpp>
=> > #include <xercesc/util/PlatformUtils.hpp>
=> >
=> > XERCES_CPP_NAMESPACE_USE
=> >
=> > int main (int argc, char *argv[])
=> > {
=> >    XMLPlatformUtils::Initialize();
=> >    DOMImplementation *impl =
=> DOMImplementationRegistry::getDOMImplementation(XMLString::transcode
=> ("LS"));
=> >    DOMDocument* doc = impl->createDocument(0,  // root element namespace
=> URI.
=> >                                            XMLString::transcode("head"),
=> >                                            0); // document type object
=> (DTD).
=> >    return (0);
=> > }
=> > --------------------------------------------------------------------
=> >
=> > Thanks in advance for any help you can provide.
=> >
=> > Doug Chinnery
=> >
=> > ---------------------------------------------------------------------
=> > 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
=> 
=> 

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


Re: Cannot open library

Posted by PeiYong Zhang <pe...@ca.ibm.com>.
Did you add the path where the libarries located to LD_LIBRARY_PATH (
or SHLIB_PATH)?

you may run ldd on DOMcount to see if the libxercesc is resolved or not.

Rgds,
PeiYong
----- Original Message -----
From: "Doug Chinnery" <do...@zadall.com>
To: <xe...@xml.apache.org>
Sent: Thursday, April 03, 2003 8:00 PM
Subject: Cannot open library


>
> I've downloaded, built and installed the xerces-c library.  As
> expected, it created 3 shared libraries in my /usr/local/lib
> directory, called:
>
> libxerces-c.so@
> libxerces-c.so.22@
> libxerces-c.so.22.0
>
> When I try to run my program I get the following error:
>
> dynamic linker : ./CreateDOMDocument : error opening libxerces-c2_2_0.so
>
> As you can see, this library doesn't exist among the libs that were
> created.  I made a link to another library called libxerces-c2_2_0.so,
> and I got rid of the dynamic linker error, but now my code dumps core.
>
> Any thoughts on why the dynamic linker would be looking for modules in
> a library that doesn't exist? Here's my short program in case there's
> something really wacked out with the code itself:
> -------------------------------------------------------------------
>
> #include <xercesc/dom/DOM.hpp>
> #include <xercesc/util/PlatformUtils.hpp>
>
> XERCES_CPP_NAMESPACE_USE
>
> int main (int argc, char *argv[])
> {
>    XMLPlatformUtils::Initialize();
>    DOMImplementation *impl =
DOMImplementationRegistry::getDOMImplementation(XMLString::transcode
("LS"));
>    DOMDocument* doc = impl->createDocument(0,  // root element namespace
URI.
>                                            XMLString::transcode("head"),
>                                            0); // document type object
(DTD).
>    return (0);
> }
> --------------------------------------------------------------------
>
> Thanks in advance for any help you can provide.
>
> Doug Chinnery
>
> ---------------------------------------------------------------------
> 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