编译链接

ProtoBuf Compile Link GCC

本文关键字:链接 编译      更新时间:2023-10-16

我正在尝试调试为什么protobuf没有被链接到我的c++项目中。

所以我在cygwin中尝试了这个:

$ gcc -libprotobuf
/usr/lib/gcc/x86_64-pc-cygwin/4.9.3/../../../../x86_64-pc-cygwin/bin/ld: cannot find -libprotobuf
collect2: error: ld returned 1 exit status
我在cygwin上构建并安装了protobuf。

应该是-lprotobuf,找到libprotobuf。在/usr/lib或/usr/lib64/