c++ - Statically linked xerces 3.0.0 does not work while dynamic works on Linux -


so trying statically link xerces 3.0.0 on linux.

i did dynamic link , works, in order avoid dependancy want statically.

i changed of make files in appropriate way

-wl,-bstatic ... -lxerces-c -wl,-bdynamic ...

but getting following errors:

  undefined reference '__ctype_b'   undefined reference '__ctype_tolower'   undefined reference '__ctype_toupper' 

i fixed brute force method found here

but there type of errors related 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 `pthread_mutexattr_init' posixmutexmgr.cpp:(.text+0x95): undefined reference `pthread_mutexattr_settype' posixmutexmgr.cpp:(.text+0xad): undefined reference `pthread_mutexattr_destroy' posixmutexmgr.cpp:(.text+0xd0): undefined reference `pthread_mutexattr_destroy' 

it seems missing pthread tried adding not fix problem... these errors coming xerces ...and dynamic version works fine static 1 failing.

any ideas???

thanks

the dynamic version of xerces have dependencies on libpthread ensure loader pick correct library.

specifying libphtread on linker command line should fix unresolved externals, did (a) put in in right place on command line ordering matters , (b) did try both static , dynamic versions of libpthread?


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -