Ich habe einen einfachen Socket in C mit Winsock aber wenn ich das kompilieren will kommen mehrere Fehler.
C:\Users\arndt\Desktop>gcc main.c -o main
C:\Users\arndt\AppData\Local\Temp\ccyegOgo.o:main.c:(.text+0x2b): undefined reference to `WSAStartup@8'
C:\Users\arndt\AppData\Local\Temp\ccyegOgo.o:main.c:(.text+0x4a): undefined reference to `socket@12'
C:\Users\arndt\AppData\Local\Temp\ccyegOgo.o:main.c:(.text+0x65): undefined reference to `htons@4'
C:\Users\arndt\AppData\Local\Temp\ccyegOgo.o:main.c:(.text+0x96): undefined reference to `bind@12'
C:\Users\arndt\AppData\Local\Temp\ccyegOgo.o:main.c:(.text+0xac): undefined reference to `listen@8'
C:\Users\arndt\AppData\Local\Temp\ccyegOgo.o:main.c:(.text+0xd8): undefined reference to `accept@12'
C:\Users\arndt\AppData\Local\Temp\ccyegOgo.o:main.c:(.text+0x103): undefined reference to `recv@16'
C:\Users\arndt\AppData\Local\Temp\ccyegOgo.o:main.c:(.text+0x129): undefined reference to `send@16'
C:\Users\arndt\AppData\Local\Temp\ccyegOgo.o:main.c:(.text+0x137): undefined reference to `closesocket@4'
C:\Users\arndt\AppData\Local\Temp\ccyegOgo.o:main.c:(.text+0x145): undefined reference to `closesocket@4'
C:\Users\arndt\AppData\Local\Temp\ccyegOgo.o:main.c:(.text+0x14d): undefined reference to `WSACleanup@0'
collect2.exe: error: ld returned 1 exit status
Wie referenziere ich diese Funktionen?