I will not go into details about the usage instructions in many places. Here I will only talk about some details, that is, what I made a mistake.
I checked a lot of information today and did not solve the problem. I am writing it now to help the troubled people.
1.About the library file path
/Configure
Make check
Make install
After three commands, the installation is complete.
After the installation, run protoc and the system prompts that two libraries cannot be found: libprotobuf. so and libprotoc. so. The reason is that these two libraries are installed under/usr/local/lib, but the lib path of the UT is/usr/lib. Some systems use usr/lib as the library file directory, and some systems use usr/local/lib as the library directory
You can modify the environment variable by modifying the profile of the etc (system level) or home (user level. A file in source can be used directly without restarting.
This setting can contain two types of lib
LD_LIBRARY_PATH = $ LD_LIBRARY_PATH:/usr/lib:/usr/local/lib
Export
LD_LIBRARY_PATH
2. Import the header file "XX. h ";Remember to add;
3. enumTo ";"Separate, instead ","