Thread: inet.h

  1. #1
    Registered User
    Join Date
    Feb 2009
    Posts
    6

    inet.h

    Hello,
    I am using devcpp to compile my C programs.

    I am including the file inet.h <arpa/inet.h> but the compiler is returning that the file not found. I tried installing few networking devcpp packages but that didnot help.

    Earlier I was compiling in unix and never faced any such error. Can anybody please help.
    Thanks,
    Ayn

  2. #2
    Registered User
    Join Date
    Feb 2009
    Posts
    6
    Is it that I need to use the winsock libraries instead of the unix libraries?

  3. #3
    Registered User carrotcake1029's Avatar
    Join Date
    Apr 2008
    Posts
    404
    Yes, winsock2.h and you probably will need to link ws2_32.lib

  4. #4
    Registered User
    Join Date
    Feb 2009
    Posts
    6
    Hi,
    Thanks for the reply.. I just figured that out.. and my program is compiling.. I am not sure if its working though as my ip to int conversion is always returning 0 Guess I need to read some winsock stuffs. Thx.

  5. #5
    Registered User
    Join Date
    Feb 2009
    Posts
    6
    Is there anything else I need to do to use inet_addr() function?

  6. #6
    Registered User carrotcake1029's Avatar
    Join Date
    Apr 2008
    Posts
    404
    Show us what you are currently trying to do. Lets not play the guessing game.

Popular pages Recent additions subscribe to a feed