0

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)

PaperBirdMaster
  • 12,806
  • 9
  • 48
  • 94
user2652995
  • 57
  • 2
  • 15

1 Answers1

2
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.

zakinster
  • 10,508
  • 1
  • 41
  • 52