C++ Linker Error: undefined reference involving `std::__cxx11::basic_string`
Prebuilt library was compiled with legacy pre-C++11 ABI (`_GLIBCXX_USE_CXX11_ABI=0`) while app uses `1`.
Runs locally in browser
Free · No login
Independently Verified 2026-11-25
v4.1.0
Identifier: C++ Linker Error
Platform: C/C++
Common Root Causes:
- Prebuilt library was compiled with legacy pre-C++11 ABI (`_GLIBCXX_USE_CXX11_ABI=0`) while app uses `1`.
Interactive Diagnostic Checklist
Verified Solutions:
- Rebuild all C++ dependencies with the same GCC standard library ABI setting.
Safe Diagnostic Command:
nm -C <lib.so> | grep __cxx11
Warning: Verify configuration changes in staging or with dry-run flags (e.g. nginx -t) before reloading production services.
Technical Explanation
Prebuilt library was compiled with legacy pre-C++11 ABI (`_GLIBCXX_USE_CXX11_ABI=0`) while app uses `1`. Recommended diagnostic: `nm -C <lib.so> | grep __cxx11`. Remediation: Rebuild all C++ dependencies with the same GCC standard library ABI setting.
Worked Examples
- Run `nm -C <lib.so> | grep __cxx11` to verify root cause before applying the remediation.
Limitations & Assumptions
- Always verify configuration changes in staging or with dry-run flags (e.g. `nginx -t`) before reloading production services.
Source References & Verification
Resource ID: err-cpp-abi-cxx11-string-mismatch · Independently verified: 2026-11-25