Home > Backend Development > C++ > body text

Why Does Boost::Program_Options Fail to Link When Using Clang with libc in C 0x Mode?

Barbara Streisand
Release: 2024-11-03 20:08:29
Original
1050 people have browsed it

Why Does Boost::Program_Options Fail to Link When Using Clang with libc   in C  0x Mode?

Why does the boost::program_options fail to link when using clang with libc in c 0x mode?

Despite compiling boost using clang with the libc library, the code linking fails when using clang in c 0x mode. This is because libc is not binary compatible with gcc's libstdc . While the API of std::string remains the same, its ABI is modified using C 11's inline namespace feature, leading the linker to treat std::string and std::__1::basic_string as distinct data structures. This prevents a successful link between the binary and the library.

The above is the detailed content of Why Does Boost::Program_Options Fail to Link When Using Clang with libc in C 0x Mode?. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template