运行server下的function.c 编译出现的错误neusoft@neusoft-desktop:~/server$ gcc function.c
function.c:1: warning: "struct sockaddr_in" declared inside parameter list
function.c:1: warning: its scope is only this definition or declaration, which is probably not what you want
function.c: In function `build_tcp_server':
function.c:4: error: `AF_INET' undeclared (first use in this function)
function.c:4: error: (Each undeclared identifier is reported only once
function.c:4: error: for each function it appears in.)
function.c:4: error: `SOCK_STREAM' undeclared (first use in this function)
function.c:6: error: `stderr' undeclared (first use in this function)
function.c:6: error: `errno' undeclared (first use in this function)
function.c:9: error: 对不完全的类型"
Internal compiler error: Error reporting routines re-entered.
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:
http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-3.4/README.Bugs>.
编译server.c时出现的错误
server.c: In function `main':
server.c:3: error: storage size of 'tcpaddr' isn't known
server.c:14: error: 对不完全的类型"
Internal compiler error: Error reporting routines re-entered.
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:
http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-3.4/README.Bugs>.
运行client下的function.c 编译出现的错误
function.c:1: warning: "struct sockaddr_in" declared inside parameter list
function.c:1: warning: its scope is only this definition or declaration, which is probably not what you want
function.c:2: error: parameter `tcpaddr' has incomplete type
function.c: In function `build_tcp_client':
function.c:4: error: `AF_INET' undeclared (first use in this function)
function.c:4: error: (Each undeclared identifier is reported only once
function.c:4: error: for each function it appears in.)
function.c:4: error: `SOCK_STREAM' undeclared (first use in this function)
function.c:6: error: `stderr' undeclared (first use in this function)
function.c:6: error: `errno' undeclared (first use in this function)
function.c:9: error: 对不完全的类型"
Internal compiler error: Error reporting routines re-entered.
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:
http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-3.4/README.Bugs>.
编译client.c时出现的错误
client.c: In function `main':
client.c:3: error: storage size of 'tcpaddr' isn't known
client.c:10: error: 对不完全的类型"
Internal compiler error: Error reporting routines re-entered.
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:
http://gcc.gnu.org/bugs.html> for instructions.
For Debian GNU/Linux specific bug reporting instructions,
see <URL:file:///usr/share/doc/gcc-3.4/README.Bugs>.