[Solved] Protobuf Error: ‘tr1/unordered_map’ file not found

This problem, after checking a lot of information, in general is the problem of the C++ version, the new version of the namespace structure has changed, the C++ library hierarchy has changed

1.config.h

HASH_MAP_H HASH_SET_H

The new version of the header file lookup is modified to <unordered_map>, other tr1/xxx introduced also changed to xxx

HASH_NAMESPACE std::str

The new version of tr1 has been removed, so there is no more intermediate layer here, just set it to std

2.message.cc

Implicit instantiation of undefined template ‘std::__1::basic_istream<char, std::__1::char_traits<char> >’

Here the undefined template is not found, which means we have underincluded the header file, which is also easy to determine, <istream>.

ps: theoretically there will be no problem, but need to practice a little, it is recommended that you can first compile the .a file by Mac, and then use (the first step of the modification is still needed)

Similar Posts: