Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

C Header Libraries

Options
  • 11-12-2001 12:24am
    #1
    Registered Users Posts: 326 ✭✭


    I'm fairly new to C I only started learning it in college a couple of months and becasue I'm using FreeBSD at home the lectuers at college can help me. My question is sometime when I compile stuff I get off the net it says I dont have the windows.h and the winsock.h where can I get them and once I have them where in FreeBSD do I put them?


Comments

  • Registered Users Posts: 347 ✭✭Static


    You won't have a windows.h because it's not windows, and you won't have a winsock.h for the same reason, winsock is used for socket manipulation in C on win32 platforms.

    On unix, there is another socket library. Writing C sockets isn't much different, bar the socket initialisation stuff. Have a look at this page

    http://www.ecst.csuchico.edu/~beej/guide/net/html/

    It should be perfect for what you need. If when you're compiling, you get errors about unresolved symbols, etc, try using (assuming you're using gcc as the compiler)

    gcc -lsocket -o progname progname.c

    to include the socket library during linking.


Advertisement