Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
109 views
in Technique[技术] by (71.8m points)

java - Install Protocol Buffers on Windows

I am unable to find clear instructions to install Google Protocol Buffers (including compiler) on Windows x64 platform.

I went through the instructions README file for compiler and source:

For Compiler: To install, simply place this binary somewhere in your PATH

I added system variable to Path:

PROTOC 'C:dev_toolsprotoc-2.4.1-win32'

I am stuck on installing Protocol Buffers source using Cygwin. I tried following Unix instructions provided in the readme file:

To build and install the C++ Protocol Buffer runtime and the Protocol Buffer compiler (protoc) execute the following:

$ ./configure
$ make
$ make check
$ make install

If make check fails, you can still install, but it is likely that some features of this library will not work correctly on your system. Proceed at your own risk.

make install may require superuser privileges.

For advanced usage information on configure and make, see INSTALL.txt.

** Hint on install location **

By default, the package will be installed to /usr/local. However, on many platforms, /usr/local/lib is not part of LD_LIBRARY_PATH. You can add it, but it may be easier to just install to /usr> instead. To do this, invoke configure as follows:

./configure --prefix=/usr

I get

-bash: ./configure: No such file or directory'

Can some one provide clear and detailed steps to make this work?

UPDATE

I switched to using MSYS/MINGW32 instead and I followed instructions given in this link. Now I am stuck with following:

When I run the './configure' command I get following error:
checking how to run the C++ preprocessor... /lib/cpp
configure: error: C++ preprocessor "/lib/cpp" fails sanity check'

As a result, none of the make, make install commands work. For eg:

make: No targets specified and no makefile found. Stop.
question from:https://stackoverflow.com/questions/13616033/install-protocol-buffers-on-windows

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

If you just want to compile ProtoBuf definitions, you can download precompiled binaries of protoc for all platforms right on the ProtoBuf GitHub releases page.

They had precompiled binaries at least since 2015, but it's easy to overlook them in between the many downloads.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...