我一直在遵循彼得对How to build Google's protobuf in Windows using MinGW?的回答中的步骤,但make
没有完成,错误。
我在Win64上安装了MinGW并安装了mingw-developer-toolkit
,mingw32-base
,mingw-gcc-g++
,msys-base
以及mingw32-phtreads-w32
。
在MinGW/msys/1.0
下,我创建文件夹/home/<username>
并粘贴从github下载的protobuf-3.1.0
来源。
我在protobuf目录中打开一个MSYS shell cd
并运行./autoconfig
:日志为here。
现在,我不喜欢日志中的第一件事是:
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
,shell以
结尾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和error。我不是唯一拥有issue的人。
任何想法可能是什么问题以及如何解决它?