So I am trying to statically link Xerces 3.0.0 on linux.
I did it already with dynamic link and it works, but in order to avoid dependancy I want to do it statically.
I changed all of the make files to do it in appropriate way
-Wl,-Bstatic ... -lxerces-c -Wl,-Bdynamic ...
But I am getting following errors:
undefined reference to '__ctype_b'
undefined reference to '__ctype_tolower'
undefined reference to '__ctype_toupper'
I fixed those with brute force method found here
But there was another type of errors related to xerces.
Xerces/3.0.0/lib/libxerces-c.a(PosixMutexMgr.o):
In function `xercesc_3_0::PosixMutexMgr::create(xercesc_3_0::MemoryManager*)':
PosixMutexMgr.cpp:(.text+0x84): undefined reference to `pthread_mutexattr_init'
PosixMutexMgr.cpp:(.text+0x95): undefined reference to `pthread_mutexattr_settype'
PosixMutexMgr.cpp:(.text+0xad): undefined reference to `pthread_mutexattr_destroy'
PosixMutexMgr.cpp:(.text+0xd0): undefined reference to `pthread_mutexattr_destroy'
It seems like its missing pthread so I tried adding it but that does not fix the problem... These errors are coming from Xerces ...and dynamic version works fine static one is failing.
Any ideas???
Thanks