I have written a simple client server program in which server accepts messages from clients and prints their details (hard coded for my assignment). I had written this at first on a Linux (Fedora) machine, and it was working perfectly fine. But when I try to compile the server code on my mac, it doesn't work.
Here is the message after compilation:
Undefined symbols for architecture x86_64:
"_error", referenced from:
_main in cc3O1167.o
ld: symbol(s) not found for architecture x86_64
collect2: ld returned 1 exit status
Can anyone help me out with this?
Put this at the top of your main file:
#ifdef __APPLE__
# define error printf
#endif
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