Actually, in the upcoming version, probably it would work as is since we
don't have to find the library path anymore. I'm not for totally sure,
since I don't do the non-Win32 platform drivers, so maybe there are other
reasons it wouldn't work. But that paticular one should be gone.
----------------------------------------
Dean Roddey
Software Weenie
IBM Center for Java Technology - Silicon Valley
[EMAIL PROTECTED]
Michael Mason <[EMAIL PROTECTED]>@decisionsoft.com on 02/16/2000
04:32:31 AM
Please respond to [EMAIL PROTECTED]
Sent by: [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
cc:
Subject: Re: [Xerces-C] Building a static library with xerces-c
Christophe GOETZ wrote:
> Had anyone had any experience of building a static library instead of a
shared
> one?
The error you're getting is because the platform specific code looks for
the LD_LIBRARY_PATH environment variable and doesn't work for a static
version. You can get around this by hacking the
src/util/Platforms/Linux/LinuxPlatformUtils.cpp file. Specifically, fix
XMLPlatformUtils::platformInit() so that it returns after setting up its
mutex:
void XMLPlatformUtils::platformInit()
{
//
// The atomicOps mutex needs to be created early.
// Normally, mutexes are created on first use, but there is a
// circular dependency between compareAndExchange() and
// mutex creation that must be broken.
atomicOpsMutex.fHandle = XMLPlatformUtils::makeMutex();
XMLPlatformUtils::fgLibLocation = NULL;
return;
// Leave the rest of the code here if you want
}
You can then build yourself a static library and it'll work. This is a
pretty yukky hack, but there was a thread on this a while back and we
didn't really reach a conclusion. I'm happy doing this for now, and
(when I get some time... ;) will check out the latest code and try to
fix something more satisfactory.
Hope this helps,
Mike.
--
Mike Mason, Software Engineer
XML Script Development Team Office: 44-1865-203192
http://www.xmlscript.org/ Mobile: 44-7050-288923