Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

How to Generate Header Files for Protobuf C++?

67 views
Skip to first unread message

Dương Lê

unread,
Sep 15, 2024, 12:17:15 PM9/15/24
to Protocol Buffers
Hello everyone,
I'm currently working with Protobuf in C++ and I'm trying to generate the necessary header files, such as runtime_version.h. I've followed the instructions in the CMake README, but unfortunately, I haven't had any success.
Could someone provide guidance on how to properly create these header files? Any tips or examples would be greatly appreciated!
Thank you in advance for your help!

Aldrin

unread,
Sep 17, 2024, 1:54:38 PM9/17/24
to Protocol Buffers
runtime_version.h is available from protobuf itself and not generated.

Assume I installed protobuf to INSTALL_PREFIX:
   >> find ${INSTALL_PREFIX}/include -name 'runtime_version.h'
   ${INSTALL_PREFIX}/include/google/protobuf/runtime_version.h

You can find the source directory in the protobuf repo [1].

Reply all
Reply to author
Forward
0 new messages