Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3483150
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T10:38:26+00:00 2026-05-18T10:38:26+00:00

So I am trying to statically link Xerces 3.0.0 on linux. I did it

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T10:38:26+00:00Added an answer on May 18, 2026 at 10:38 am

    The dynamic version of the xerces will have dependencies on libpthread that ensure the loader will pick up the correct library.

    Specifying libphtread on your linker command line should fix those unresolved externals, did you (a) put in in the right place on the command line as the ordering matters and (b) did you try the both the static and dynamic versions of libpthread?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been trying to statically link against a C++ library called Poco on Windows
I'm trying to statically link to libcrypto.a (from the openssl library) after building it
On Linux, I'm trying to strip a statically linked ELF file to the bare
I am facing below errors when trying to statically link libDuma, Can you tell
I've been trying to build the SDK statically on Mac OS X but I
Trying to avoid the SomethingManager trap here... Let's say I'm going to write a
I am trying to statically initialize the following structure in Visual Studio 2010: struct
I'm trying to understand how pointers to statically allocated objects work and where they
Trying to dive into Qt big time but haven't done a large project with
I'm trying to compile a statically linked binary with GCC and I'm getting warning

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.