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!