xref: /aosp_15_r20/external/jsoncpp/example/README.md (revision 4484440890e2bc6e07362b4feaf15601abfe0071)
1*44844408SAndroid Build Coastguard Worker***NOTE***
2*44844408SAndroid Build Coastguard Worker
3*44844408SAndroid Build Coastguard WorkerIf you get linker errors about undefined references to symbols that involve types in the `std::__cxx11` namespace or the tag
4*44844408SAndroid Build Coastguard Worker`[abi:cxx11]` then it probably indicates that you are trying to link together object files that were compiled with different
5*44844408SAndroid Build Coastguard Workervalues for the _GLIBCXX_USE_CXX11_ABI marco. This commonly happens when linking to a third-party library that was compiled with
6*44844408SAndroid Build Coastguard Workeran older version of GCC. If the third-party library cannot be rebuilt with the new ABI, then you need to recompile your code with
7*44844408SAndroid Build Coastguard Workerthe old ABI,just like:
8*44844408SAndroid Build Coastguard Worker**g++ stringWrite.cpp -ljsoncpp -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=0 -o stringWrite**
9*44844408SAndroid Build Coastguard Worker
10*44844408SAndroid Build Coastguard WorkerNot all of uses of the new ABI will cause changes in symbol names, for example a class with a `std::string` member variable will
11*44844408SAndroid Build Coastguard Workerhave the same mangled name whether compiled with the older or new ABI. In order to detect such problems, the new types and functions
12*44844408SAndroid Build Coastguard Workerare annotated with the abi_tag attribute, allowing the compiler to warn about potential ABI incompatibilities in code using them.
13*44844408SAndroid Build Coastguard WorkerThose warnings can be enabled with the `-Wabi-tag` option.
14