Author Topic: Linker Error  (Read 1024 times)

Zorchenhimer

  • Autococker
  • Posts: 2614
Linker Error
« on: February 16, 2008, 01:22:21 AM »
I put this in "Other Stuff" because it doesn't really have much to do with DP.  Anyway, I have source code for a Q2 rcon client.  But its linux source.  I have all of the header files, and everything compiles fine on my WinXP machine with Dev-C++ (slightly surprised I got this far though).  However, I get a bunch of linker errors in the compiler output.  I was wondering if there was an easy way to resolve this.

Code: [Select]
  multiple definition of `main'
  first defined here
  [Linker error] undefined reference to `htons'
  [Linker error] undefined reference to `stderr'
  [Linker error] undefined reference to `ntohs'
  [Linker error] undefined reference to `inet_addr'
  [Linker error] undefined reference to `bzero'
  [Linker error] undefined reference to `socket'
  [Linker error] undefined reference to `sendto'
[...]
  ld returned 1 exit status
 E:\workspace\rcon\try1\Makefile.win [Build Error]  [rcon_1.exe] Error 1

Thanks.

Edit:
Never mind.  I need to stop doing this stuff half asleep...
« Last Edit: February 16, 2008, 11:26:03 AM by Zorchenhimer »