devc++ hates networking?

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
the-wolf
Posts: 6
Joined: Thu Feb 24, 2005 8:22 pm
Location: germany

devc++ hates networking?

Post by the-wolf »

hey guys,
it's me again.
now that irrlicht works 8) i have another problem using devc++. i have a problem trying to compile the following sample networking program:

http://wolfnet.kicks-ass.net/kram/httpget.c

under linux (gcc) and windows (bcc) it compiles fine, but not with devc++.
i get some strange linker-errors: :x

Code: Select all

gcc.exe "E:\irrlicht-0.8\game\netzwerk\client\httpget.c" -o "E:\irrlicht-0.8\game\netzwerk\client\httpget.exe"   -O1  -I"include"  -I"E:\irrlicht-0.8\include"   -L"lib" -L"E:\irrlicht-0.8\lib\DevCpp" 
C:\DOKUME~1\wolf\LOKALE~1\Temp/ccaOaaaa.o(.text+0x37):httpget.c: undefined reference to `WSAStartup@8'
C:\DOKUME~1\wolf\LOKALE~1\Temp/ccaOaaaa.o(.text+0xc8):httpget.c: undefined reference to `socket@12'
C:\DOKUME~1\wolf\LOKALE~1\Temp/ccaOaaaa.o(.text+0x104):httpget.c: undefined reference to `inet_addr@4'
C:\DOKUME~1\wolf\LOKALE~1\Temp/ccaOaaaa.o(.text+0x11c):httpget.c: undefined reference to `gethostbyname@4'

C:\DOKUME~1\wolf\LOKALE~1\Temp/ccaOaaaa.o(.text+0x17c):httpget.c: undefined reference to `htons@4'
C:\DOKUME~1\wolf\LOKALE~1\Temp/ccaOaaaa.o(.text+0x19a):httpget.c: undefined reference to `connect@12'
C:\DOKUME~1\wolf\LOKALE~1\Temp/ccaOaaaa.o(.text+0x1fd):httpget.c: undefined reference to `send@16'
C:\DOKUME~1\wolf\LOKALE~1\Temp/ccaOaaaa.o(.text+0x21e):httpget.c: undefined reference to `recv@16'
C:\DOKUME~1\wolf\LOKALE~1\Temp/ccaOaaaa.o(.text+0x243):httpget.c: undefined reference to `closesocket@4'
collect2: ld returned 1 exit status
the-wolf
Posts: 6
Joined: Thu Feb 24, 2005 8:22 pm
Location: germany

Post by the-wolf »

ok, it doesn't hate networking!
you just have to manually add libwsock32.a and libws2_32.a to your projectlibraries. :oops:
Post Reply