我一直在按照彼得的回答中的步骤进行如何使用 MinGW 在 Windows 中构建 Google 的 protobuf? https://stackoverflow.com/questions/9243816/how-to-build-googles-protobuf-in-windows-using-mingw but make
没有完成并且errors out.
我在 Win64 上并安装了 MinGWmingw-developer-toolkit
, mingw32-base
, mingw-gcc-g++
, msys-base
另外mingw32-phtreads-w32
.
Under MinGW/msys/1.0
我创建文件夹/home/<username>
并粘贴protobuf-3.1.0
源码下载自github https://github.com/google/protobuf/releases.
我打开一个 MSYS shell,cd
进入 protobuf 目录并运行./autoconfig
: the log is here https://paste.ubuntu.com/23359609/.
现在,我不喜欢日志中的第一件事是:
configure:16556: checking for the pthreads library -lpthreads
configure:16589: gcc -o conftest.exe conftest.c -lpthreads -lz >&5
c:/mingw/bin/../lib/gcc/mingw32/5.3.0/../../../../mingw32/bin/ld.exe: cannot find -lpthreads
为什么找不到pthreads
当我安装它时?
然后,我继续make
并得到protoc.exe has stopped working
具有以下崩溃信息:
Problem signature:
Problem Event Name: APPCRASH
Application Name: protoc.exe
Application Version: 0.0.0.0
Application Timestamp: 580a23df
Fault Module Name: libprotobuf-11.dll
Fault Module Version: 0.0.0.0
Fault Module Timestamp: 580a225f
Exception Code: c0000005
Exception Offset: 001171cd
OS Version: 6.1.7601.2.1.0.256.4
Locale ID: 2057
Additional Information 1: 4c0d
Additional Information 2: 4c0d4d78887f76d971d5d00f1f20a433
Additional Information 3: 4c0d
Additional Information 4: 4c0d4d78887f76d971d5d00f1f20a433
外壳以
make[2]: *** [unittest_proto_middleman] Error 5
make[2]: Leaving directory `/home/ok1011/protobuf-3.1.0/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/ok1011/protobuf-3.1.0'
make: *** [all] Error 2
在这里你可以找到品牌log http://pasted.co/f25c2bad and error http://pasted.co/3130417f。我不是唯一一个有这个问题的人issue https://github.com/google/protobuf/issues/2089.
任何想法可能是什么问题以及如何解决它?