---
name: "protoc"
section: "1"
platform: "linux"
package: "protobuf-compiler"
version: "3.21.12-11+deb13u1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/protoc"
---

# protoc(1)

compile protocol buffer description files

## NAME

protoc - compile protocol buffer description files

## SYNOPSIS

**protoc** \[**--cpp\_out=***OUT\_DIR*\] \[**--java\_out=***OUT\_DIR*\] \[**--python\_out=***OUT\_DIR*\] \[**-I***PATH* \| **--proto\_path=***PATH*\] *PROTO\_FILE*

**protoc** {**-h** \| **--help**}

**protoc** **--version**

## DESCRIPTION

**protoc** is a compiler for protocol buffers definitions files. It can can generate C++, Java and Python source code for the classes defined in *PROTO\_FILE*.

## OPTIONS

- **-I***PATH*, **--proto\_path=***PATH*

  Specify the directory in which to search for imports. May be specified multiple times; directories will be searched in order. If not given, the current working directory is used.

- **--cpp\_out=***OUT\_DIR*

  Enable generation of C++ bindings and store them in *OUT\_DIR*.

- **--java\_out=***OUT\_DIR*

  Enable generation of Java bindings and store them in *OUT\_DIR*.

- **--python\_out=***OUT\_DIR*

  Enable generation of Python bindings and store them in *OUT\_DIR*.

- **-h**, **--help**

  Show summary of options.

- **--version**

  Show version of program.

Note that at least one of the **--cpp\_out**, **--java\_out** and **--python\_out** options must be given (otherwise the program has nothing to do). It's also possible to specify more than one.

## BUGS

The program currently exits with code 255 for all errors, which makes it hard to differentiante from scripts the actual error.

The upstreams BTS can be found at **http://code.google.com/p/protobuf/issues/list**.

## SEE ALSO

More documentation about protocol buffers syntax and APIs is available online at **http://code.google.com/apis/protocolbuffers/docs/overview.html**.

## AUTHOR

**Iustin Pop** \<iustin@debian.org\>

Wrote this manpage for the Debian system.

## COPYRIGHT

Copyright © 2007 Iustin Pop\

This manual page was written for the Debian system (but may be used by others).

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or (at your option) any later version published by the Free Software Foundation.

On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL.
