Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

C Header Libraries

  • 11-12-2001 12:24AM
    #1
    Registered Users, Registered Users 2 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, Registered Users 2 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