Skip to content
🚫 DEPRECATED: go-gettable version of google/protobuf
C++ Makefile Shell Protocol Buffer Python M4 Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmd/protoc
internal
.gitignore
README.md
any.cc
any.pb.cc
api.pb.cc
arena.cc
arenastring.cc
atomicops_internals_x86_gcc.cc
atomicops_internals_x86_msvc.cc
bytestream.cc
cgo_flags.go
circle.yml
coded_stream.cc
common.cc
config.h
datapiece.cc
default_value_objectwriter.cc
descriptor.cc
descriptor.pb.cc
descriptor_database.cc
duration.pb.cc
dynamic_message.cc
empty.pb.cc
error_listener.cc
extension_set.cc
extension_set_heavy.cc
field_comparator.cc
field_mask.pb.cc
field_mask_util.cc
field_mask_utility.cc
generated_message_reflection.cc
generated_message_util.cc
gitignore.patch
gzip_stream.cc
import.sh
importer.cc
int128.cc
json_escaping.cc
json_objectwriter.cc
json_stream_parser.cc
json_util.cc
map_field.cc
mathlimits.cc
message.cc
message_differencer.cc
message_lite.cc
object_writer.cc
once.cc
parser.cc
printer.cc
proto_writer.cc
protostream_objectsource.cc
protostream_objectwriter.cc
reflection_ops.cc
repeated_field.cc
service.cc
source_context.pb.cc
status.cc
statusor.cc
stringpiece.cc
stringprintf.cc
strtod.cc
struct.pb.cc
structurally_valid.cc
strutil.cc
substitute.cc
text_format.cc
time.cc
time_util.cc
timestamp.pb.cc
tokenizer.cc
type.pb.cc
type_info.cc
type_info_test_helper.cc
type_resolver_util.cc
unknown_field_set.cc
utility.cc
wire_format.cc
wire_format_lite.cc
wrappers.pb.cc
zero_copy_stream.cc
zero_copy_stream_impl.cc
zero_copy_stream_impl_lite.cc

README.md

Google Protobuf's

This is a go-gettable version of the Google C++ protobuf library for use in Go code that needs to link against the C++ protobuf library but wants to integrate with go get and go build. The sources track the 3.0.0 release; take a look at import.sh to get the currently used version.

To use in your project you need to import the package and set appropriate cgo flag directives:

import _ "github.com/cockroachdb/c-protobuf"

// #cgo CXXFLAGS: -std=c++11
// #cgo CPPFLAGS: -I <relative-path>/c-protobuf/internal/src
// #cgo darwin LDFLAGS: -Wl,-undefined -Wl,dynamic_lookup
// #cgo !darwin LDFLAGS: -Wl,-unresolved-symbols=ignore-all
import "C"
You can’t perform that action at this time.