Menu

sys/socket.h, netdb.h files missing

2010-03-25
2012-09-26
  • Seetharaman

    Seetharaman - 2010-03-25

    Hi all,
    i created a dev-c++ C project in vista. While compiling it says sys/socket.h,
    netdb.h files are missing. where i can download and include these header
    files. i dont want to use windows header files.
    thanks

     
  • cpns

    cpns - 2010-03-25

    Having the header files alone will not help; you will still need a library to
    link to, and they do not exist on Windows. These headers are for BSD socket
    API, but you are developing in Windows which uses the WinSock API. WinSock is
    based on BSD and porting between then is relatively straightforward. See here:
    http://msdn.microsoft.com/en-
    us/library/ms740096%28VS.85%29.aspx
    . It would be trivial to create a wrapper
    that would make winsock look like BSD.

    If you really must use BSD sockets on Windows, you will have to use Cygwin,
    which is a sledgehammer to crack a nut, and will probably cause more problems
    than it solves unless you have a really large code base to port and are
    willing to suffer the pain of deploying such applications.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.