This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: g++ and sockets
- To: Neil Curran <curranneil at hotmail dot com>
- Subject: Re: g++ and sockets
- From: <llewelly at dbritsch dot dsl dot xmission dot com>
- Date: Fri, 12 May 2000 01:45:26 -0600 (MDT)
- Cc: gcc at gcc dot gnu dot org
This list is for development of gcc.
It is not a place to learn C/C++
Please send questions of this nature to comp.lang.c++.moderated, or some
similar forum.
On Fri, 12 May 2000, Neil Curran wrote:
> Hi,
> I am trying to use the socket.h file in c++ code using g++. Code that
> compiles and runs as c code will generate errors as c++ code like:
>
> stest1.cpp: In function `int main()':
> stest1.cpp:21:w arning: implicit declaration of function `int bzero(...)'
> stest1.cpp:39: warning: implicit declaration of function `int
> inet_ntoa(...)'
> stest1.cpp:40: warning: implicit declaration of function `int fork(...)'
> stest1.cpp:43:w arning: implicit declaration of function `int close(...)'
>
> Could anyone help me get around this?, I am using Solaris 2.6 and gcc 2.8.1
>
[snip]
Probably, you just need to #include the header files that declare these
functions. On most unices, 'man fork' will till you what header file
fork() is declared in.