Reputation: 57
I try to compile this http://www.nongnu.org/cpirc/
I have got errors like : (when linking)
118 IRC.cc undefined reference to `__imp_socket'
123 IRC.cc undefined reference to `__imp_gethostbyname'
I dont know how to fix problem in visual i dont have this erros (but i want to compile it in dev c++)
I try to find solution on internet, but there are not solution for dev c++ (i dont saw)
Upvotes: 0
Views: 4094
Reputation: 10698
118 IRC.cc undefined reference to `__imp_socket'
123 IRC.cc undefined reference to `__imp_gethostbyname'
You don't seem to have correctly linked to the Windows Socket 2 library called ws2_32.lib
.
Try adding -lws2_32
to the linker options.
Upvotes: 2