【发布时间】:2012-01-20 14:23:16
【问题描述】:
我目前正在做一个项目,我正在尝试实现 Protocol Buffers 以作为序列化格式在本地计算机上存储数据,然后稍后再读回。协议缓冲区的一些功能似乎非常适合这个项目,所以我很想对其进行测试,但我遇到了一些问题。
不过,到目前为止,我什至还没有足够远来测试协议缓冲区。我将最新的 zip 文件(2.4.1 版)下载到我的 Windows 机器上。我通读了位于文件夹根目录中的 install.txt,但它适用于基于 Unix 的系统。然后我看到它带有一个 vsprojects 文件夹,并阅读了那里列出的说明。基本上,我被告知要做的就是打开一个解决方案,然后在 Debug 或 Release 中构建整个解决方案。我立即收到几个关于“config.h”未找到的错误。
我再次检查了 Unix 指令,第一步是......
cd' to the directory containing the package's source code and type './configure' to configure the package for your system. If you're usingcsh' 在旧版本的 System V 上,您可能需要输入sh ./configure' instead to preventcsh' 试图执行 `configure' 本身。运行“配置”需要一段时间。运行时,它会打印一些 消息告诉它正在检查哪些功能。
所以我启动了我很少使用的 ubuntu,并尝试按照这些说明进行操作。上面列出的步骤很顺利,我什至可以进入下一步并“制作”项目,但是当需要使用“制作安装”时,我收到了以下错误:
ross@ubuntu:~/Desktop/protobuf-2.4.1$ make install
Making install in .
make[1]: Entering directory `/home/ross/Desktop/protobuf-2.4.1'
make[2]: Entering directory `/home/ross/Desktop/protobuf-2.4.1'
make[2]: Nothing to be done for `install-exec-am'.
test -z "/usr/local/lib/pkgconfig" || /bin/mkdir -p "/usr/local/lib/pkgconfig"
/bin/mkdir: cannot create directory `/usr/local/lib/pkgconfig': Permission denied
make[2]: *** [install-pkgconfigDATA] Error 1
make[2]: Leaving directory `/home/ross/Desktop/protobuf-2.4.1'
make[1]: *** [install-am] Error 2
make[1]: Leaving directory `/home/ross/Desktop/protobuf-2.4.1'
make: * [安装递归] 错误 1
我主要使用windows进行开发,而我现在正在使用的整个项目都是在windows中制作的,所以我有点担心。有没有人在 Windows 或 linux 中构建协议缓冲区有任何运气?
谢谢
【问题讨论】:
标签: windows visual-studio-2010 unix makefile protocol-buffers