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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:24:50+00:00 2026-06-12T01:24:50+00:00

If I have library that was written in C++03 and I compile it to

  • 0

If I have library that was written in C++03 and I compile it to a static library, can I then use it in C++11? Also is the reverse possible ( C++11 static library with C++03 ).

Update:
The compiler I am using is clang or LLVM

  • 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-12T01:24:52+00:00Added an answer on June 12, 2026 at 1:24 am

    It depends primarily on how you use the C++ standard library in your library.

    • If you don’t use it at all, then you are unlikely to encounter any problems.

    • If you use libstdc++, then you may encounter some issues:

      • Passing standard library objects to and from your library will not always work (for instance, std::list in C++11 mode will eventually be larger than it currently is in C++98 mode, because it is growing a size data member, and the representation of std::string is changing to a non-reference-counted one). The g++ developers have a plan to introduce a form of symbol tainting to catch these issues at link time, so you will get errors if you hit any of the problematic cases, but this has not been implemented yet in g++ and may never be implemented in Clang. You can avoid this problem by ensuring that your library’s interface does not involve standard library types.

      • Some symbols may change meaning (for instance, std::complex::real and std::complex::imag return references in C++98 mode, but return by value in C++11 mode, due to a constexpr deficiency). If you link together (unoptimized) code using both the C++98 and C++11 forms, you may have the wrong implementation chosen, with strange results at runtime.

    • If you use libc++, you should not see any issues. libc++ was designed to be binary-compatible between C++98 and C++11 modes.

    • If you use libc++ in the library and libstdc++ in the program, or vice versa, then most incompatibilities will be caught at link time. (libc++ uses an inline namespace within namespace std containing most of its symbols, causing link-time incompatibilities if you try to pass libstdc++‘s types across the boundary). However, you may still have runtime problems if your library’s interface indirectly contains standard library types (for instance, if it uses a struct which has a standard library type as a member). For the types which libc++ does not version, it aims to be binary-compatible with libstdc++ (in both C++98 and C++11 modes).

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

Sidebar

Related Questions

I have a library written in C that I would like to use in
i have written a library with some classes that make use of qt object
I have written a static library to re-use some code between iOS projects, let's
I have one shared library ,Which written in c build using arm-linux-androideabi-gcc compiler now
I have a common comms library that i have written to communicate with our
I have a date picker library written for MooTools that I want to port
Using non-thread safe libraries with threads. Say I have a library that makes a
I have a custom library that can pick mulitple images from the camera roll,
I have a class library written in .Net that I would like to make
I have written a C++ library that saves my data (a collection of custom

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.