minetest-mapper-cpp/cmake/abi-stdstring.cpp
Rogier 9a9b83e638 Detect libstdc++ ABI incompatibility to allow compiling using clang again.
Currently, this is only relevant when using LevelDB, and a newer version
of libstdc++, which uses a different C++ ABI which clang does not yet support.

A symptom of the problem are unexpected linking failures, caused by undefined
symbols, while other symbols from the same library do not cause errors.

The solution is a workaround, that avoids using the offending symbols, at the
cost of reduced functionality. As this currently only affects the text of an
error message, the impact is minor.
2016-06-28 11:44:09 +02:00

8 lines
139 B
C++

#include <string>
#include <leveldb/status.h>
int main(void) {
leveldb::Status status;
std::string str = status.ToString();
return 0;
}