I need to do some socket programming on Mac OS X but I'm missing the library for it? This is what happens when I compile:
gcc ser.c -o ser -lsocket -lnsl
ser.c: In function ‘main’:
ser.c:41: warning: format ‘%.24s’ expects type ‘char *’, but argument 6 has type ‘int’
ld: library not found for -lsocket
collect2: ld returned 1 exit status
How do I get this library?
You don't need -lsocket on OS X.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With