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 7089607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:56:33+00:00 2026-05-28T07:56:33+00:00

After surprisingly little hacking about, I managed to get libc++ installed on my Linux

  • 0

After surprisingly little hacking about, I managed to get libc++ installed on my Linux box (as libstdc++ is missing things). Unfortunately, a bit of my existing code has now broken, on account of functions with the same name.

Normally, and in the manner I need, bind() relates to sockets. However, libc++ came with its own bind() function, which is basically this but without a convenient namespace to separate them. In accordance with Murphy’s Law, the compiler attempts to use the wrong function, and spits out an error. NetBeans does not see any issue, because it’s actually looking in the sys/socket.h file, as it very well should.

So, with both functions basically beyond the scope of my control, how would I tell the compiler (clang++) that it should look in a specific header and nowhere else for that function?

  • 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-28T07:56:34+00:00Added an answer on May 28, 2026 at 7:56 am

    First, this hasn’t anything to do with Murphy, I’d think: the choice of the bind() template is probably just the better match. The declaration of std::bind() is in namespace std, however, at least in the version of the header file I’m looking at. Is it possible that your source file contains a using directive? (in which case you deserve all the pain you asked for)

    If there is no using directive, the non-template version should be a better match if the arguments match exactly. If this still doesn’t help, you can create a forwarding function for the bind() function from <sys/socket.h>, let’s say avoid_conflict_bind() which is the only function defined in the translation unit, i.e. it would only include <sys/socket.h> and not <functional>. This way there is no choice for the bind() function this function forwards to and you can then use avoid_conflict_bind().

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

Sidebar

Related Questions

Surprisingly enough there's very little information on the Web about using Bouncy Castle's lightweight
When trying to launch Mercurial(hg) after a restart in my Ubuntu 9.10 Linux Box
After reading a bit more about how Gnutella and other P2P networks function, I
I'm struggling to get a hang of branching in CVS after reading the documentation
I installed gitosis on my Ubuntu 10.4 Server via apt-get install gitosis Then I
After upgrading to Lion, and installing XCode 4.3 I can't get Hello, World to
After reading the Head First Design Patterns book and using a number of other
After the suggestion to use a library for my ajax needs I am going
After reading this question , I was reminded of when I was taught Java
After upgrading to the latest version of TortoiseSVN (1.5.2.13595), it's context menu is no

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.