🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #653

C++ and C

#653
From: Fabrizio Cane
Date: Tue, 17 Nov 1992 13:07
36 lines
1151 bytes
hi

I have a problem when I try to interface the gnu C++ to
the standard C functions. I want to use for example a C
routine ( let be socket() ) in a C++ program.

main(int argc, char* argv[])
{
...
    socket(parameters);
...
}

At compile time I have the following warning:

main.C: In function `int  main (int, char **)':
main.C: warning: implicit declaration of function `socket()'

The program works bu I would like to remove these 
warnings and apparently I cant do it using

extern int socket()
or
extern int socket(...)
or 
extern int socket('parameter declaration')

because in this case the linker does not find the
expected C++ object of socket() that is named 
socket_??_???_ because of the parameter check !

Any idea about that ?

Thank you
Fab
Technical Details
Message-ID: <9211171107.AA00444@sun2.cern.ch>
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!sun2.cern.CH!cane

Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.help
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!sun2.cern.CH!cane
From: cane@sun2.cern.CH (Fabrizio Cane)
Subject: C++ and C
Message-ID: <9211171107.AA00444@sun2.cern.ch>
Sender: daemon@cis.ohio-state.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Tue, 17 Nov 1992 13:07:02 GMT
Lines: 37