Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Dev c++ and winsock2

This thread is locked; no one can reply to it. rss feed Print
Dev c++ and winsock2
Sudarno Nguyen
Member #2,511
July 2002

Can someone help me in setting up winsock2 in DEV C++? I don't know i'm doing the right stuff.

1. First I #include <winsock2.h>
2. Then copy ws2_32.lib into the C:\Dev-Cpp\Lib directory.
3. Next I goto project options and load object file C:\Dev-Cpp\Lib\ws2_32.lib

ws2_32.lib is from microsoft visual studio.

It would be a great help if someone can show me a small example using DEV-C++.

Thanks

You bloody little koda......

HoopsMan
Member #1,943
February 2002

Isn't the format of Visual C++ library files different from Mingw Archives? I don't think it will run directly. You might have to use dlltool to make a static import library from the Winsock2 dll. The .lib file most probably wont work directly.

Go to: