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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T14:19:05+00:00 2026-06-07T14:19:05+00:00

I have in my own code an namespace core that is conflicting with the

  • 0

I have in my own code an namespace core that is conflicting with the namespace core of a dynamic library that I am using. The problem appears because I can not modify neither one nor the other. The first core because is part of our team project, and the second because is part of the library. Is there a way to solve this situation?

  • 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-06-07T14:19:08+00:00Added an answer on June 7, 2026 at 2:19 pm

    Try turning your core namespace into a sub namespace.

    This way you can get access to each ‘core’ namespace. This also explicitly shows which ‘core’ is being referred to. Even if the external library has the same function names you will be safe.

    However, you mentioned that you can’t actually change anything in the original code, so your only option is to use a different library and hope it doesn’t have a ‘core’ namespace in it. Seems to me like it might be alot easier to convince your team to change their code.

    // Your 'core' namespace, inside your own namespace.
    namespace Mygame
    {
      namespace core
      {
        void Foo();
      }
    }
    
    // Access both namespaces safely.
    Mygame::core::Foo();
    core::Foo();
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have written a code which calculates Fibonacci number using my own arbitrary precision
In the demos I have seen and in my own code, SlickGrid cells do
I have my own simple equal heights code in jQuery to make two columns
I have existing code with their own makefiles which I want to load into
I have Integrated ZXing code into my own app and I have commented the
We have a library that deals with many aspects of error reporting. I have
I have a file that require()'s a namespace, as such: <?php require_once('Beer.php'); // This
I have tried to implement own operator and used in map<>, code looks as
I have the following code snippet: void foo(double a) {} namespace bar_space { struct
I believe that I have successfully impersonated my own user account while running an

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.