【发布时间】:2012-06-26 20:14:48
【问题描述】:
当我尝试编译测试代码时出现链接错误。 我在 Windows 7 上使用 cygwin。 ./configure、make、make test 和 make install 等初始步骤进行得很顺利
我还可以使用 protoc 命令生成 .pb.cc 和 .pb.h。
但是当我尝试编译我的测试代码时,会出现很多链接错误。我确定这些错误是因为它无法链接到库。
Cygwin 在 /usr/local/lib 中有 protobuf 静态库和链接库 .包含文件存在于 /usr/local/include 中
我尝试使用 -lprotobuf,但它返回错误说 -lprotobuf not found
【问题讨论】: