@@ -48,8 +48,8 @@ environment variables will be used when building grpc-java.
4848
4949Protobuf installs to `` /usr/local `` by default.
5050
51- For Visual C++, please refer to the [ Protobuf README] ( https://github.com/google/protobuf/blob/master/vsprojects/readme.txt )
52- for how to compile Protobuf.
51+ For Visual C++, please refer to the [ Protobuf README] ( https://github.com/google/protobuf/blob/master/cmake/README.md )
52+ for how to compile Protobuf. gRPC-java assumes a Release build.
5353
5454#### Linux and MinGW
5555If `` /usr/local/lib `` is not in your library search path, you can add it by running:
@@ -73,19 +73,22 @@ Gradle to find protobuf:
7373```
7474.\gradlew install ^
7575 -PvcProtobufInclude=C:\path\to\protobuf-3.0.0-beta-1\src ^
76- -PvcProtobufLibs=C:\path\to\protobuf-3.0.0-beta-1\vsprojects\Release
76+ -PvcProtobufLibs=C:\path\to\protobuf-3.0.0-beta-1\vsprojects\Release ^
77+ -PtargetArch=x86_32
7778```
7879
7980Since specifying those properties every build is bothersome, you can instead
8081create `` <project-root>\gradle.properties `` with contents like:
8182```
8283vcProtobufInclude=C:\\path\\to\\protobuf-3.0.0-beta-1\\src
8384vcProtobufLibs=C:\\path\\to\\protobuf-3.0.0-beta-1\\vsprojects\\Release
85+ targetArch=x86_32
8486```
8587
86- The build script will build the codegen for the same architecture as the Java
87- runtime installed on your system. If you are using 64-bit JVM, the codegen will
88- be compiled for 64-bit, that means you must have compiled Protobuf in 64-bit.
88+ By default, the build script will build the codegen for the same architecture as
89+ the Java runtime installed on your system. If you are using 64-bit JVM, the
90+ codegen will be compiled for 64-bit. Since Protobuf is only built for 32-bit by
91+ default, the ` targetArch=x86_32 ` is necessary.
8992
9093### Notes for MinGW on Windows
9194If you have both MinGW and VC++ installed on Windows, VC++ will be used by
0 commit comments