agosto 10, 2007

undefined reference ntohl@4

Temp/ccK4baaa.o(.text+0x148):test.c: undefined reference to `htons@4'
Temp/ccK4baaa.o(.text+0x15f):test.c: undefined reference to `inet_addr@4'
Temp/ccK4baaa.o(.text+0x1d9):test.c: undefined reference to `WSAStartup@8'
Temp/ccK4baaa.o(.text+0x208):test.c: undefined reference to `gethostbyname@4'
Temp/ccK4baaa.o(.text+0x224):test.c: undefined reference to `inet_addr@4'
Temp/ccK4baaa.o(.text+0x276):test.c: undefined reference to `socket@12'
Temp/ccK4baaa.o(.text+0x2f2):test.c: undefined reference to `htons@4'
Temp/ccK4baaa.o(.text+0x31f):test.c: undefined reference to `connect@12'
Temp/ccK4baaa.o(.text+0x351):test.c: undefined reference to `send@16'
Temp/ccK4baaa.o(.text+0x382):test.c: undefined reference to `htons@4'
Temp/ccK4baaa.o(.text+0x3a5):test.c: undefined reference to `socket@12'
Temp/ccK4baaa.o(.text+0x3c5):test.c: undefined reference to `bind@12'
Temp/ccK4baaa.o(.text+0x3d6):test.c: undefined reference to `WSAGetLastError@0'
Temp/ccK4baaa.o(.text+0x405):test.c: undefined reference to `listen@8'
Temp/ccK4baaa.o(.text+0x44e):test.c: undefined reference to `accept@12'
Temp/ccK4baaa.o(.text+0x4aa):test.c: undefined reference to `shutdown@8'
Temp/ccK4baaa.o(.text+0x4b8):test.c: undefined reference to `closesocket@4'
Temp/ccK4baaa.o(.text+0x4ce):test.c: undefined reference to `shutdown@8'
Temp/ccK4baaa.o(.text+0x4dc):test.c: undefined reference to `closesocket@4'
Temp/ccK4baaa.o(.text+0x4f2):test.c: undefined reference to `shutdown@8'
Temp/ccK4baaa.o(.text+0x500):test.c: undefined reference to `closesocket@4'
Temp/ccK4baaa.o(.text+0x5a4):test.c: undefined reference to `select@20'
Temp/ccK4baaa.o(.text+0x5d5):test.c: undefined reference to `recv@16'
Temp/ccK4baaa.o(.text+0x683):test.c: undefined reference to `send@16'
collect2: ld returned 1 exit status


Resulta que falta un -lwsock32 en el comando gcc.

comentarios: