我正在使用 Linux Mint 13,并且正在研究“Unix 网络编程:进程间通信”一书。我下载了这本书的源代码 - http://www.kohala.com/start/unpv22e/unpv22e.html - 并按照说明进行操作。
首先,我在基本目录中运行 ./configure
然后,我进入 lib 目录并运行 make。这给出了以下错误 -
gcc -c "/home/linux/Code/c/unix_network_programming/main.c" -g -o ./Debug/main.o "-I." "-I."
In file included from /usr/lib/gcc/i686-linux-gnu/4.6/include/stdint.h:3:0,
from /usr/include/netinet/in.h:24,
from /usr/include/rpc/types.h:91,
from /usr/include/rpc/rpc.h:38,
from /home/linux/Code/c/unix_network_programming/unpipc.h:115,
from /home/linux/Code/c/unix_network_programming/main.c:2:
/usr/include/stdint.h:49:24: error: duplicate ‘unsigned’
/usr/include/stdint.h:49:24: error: two or more data types in declaration specifiers
/usr/include/stdint.h:50:28: error: duplicate ‘unsigned’
/usr/include/stdint.h:50:28: error: duplicate ‘short’
/usr/include/stdint.h:52:23: error: duplicate ‘unsigned’
/usr/include/stdint.h:52:23: error: two or more data types in declaration specifiers
这是给出错误的文件 -
#ifndef _GCC_WRAP_STDINT_H
#if __STDC_HOSTED__
# include_next <stdint.h>
#else
# include "stdint-gcc.h"
#endif
#define _GCC_WRAP_STDINT_H
#endif
由于我很少有 C 经验,因此有关如何解决此错误的任何想法?