I have a programming assignment dealing with sockets. My professor said we might need to compile using -lsocket. However, I receive, "/usr/bin/ld: can't locate file for: -lsocket" when I try to do so. Do I not need to use this command in OS X?
I've started writing a sockets program myself. Other than pulling in the appropriate header files, I'm just using a "Standard Tool" project in XCode and I have added no additional libraries.
Code:
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
// for struct sockaddr_in
#include <netinet/in.h>
// for memset
#include <strings.h>
// for getprotoent
#include <netdb.h>
I have a programming assignment dealing with sockets. My professor said we might need to compile using -lsocket. However, I receive, "/usr/bin/ld: can't locate file for: -lsocket" when I try to do so. Do I not need to use this command in OS X?