Dont have <sys/socket.h>
Vanneto

Hello!

So, I was experimenting with sockets. And I wanted to include <sys/socket.h> but couldnt. Now, im using Code::Blocks, and as far as I understand, it already comes with MinGW. I installed MinGW Devpak but that doesent work.

The version of Code::Blocks is 1.0RC2. Does anyone know how to solve this problem?

Many thanks!

GullRaDriel

#include <winsock.h>
#include <winsock2.h>

Vanneto

I am so stupid! Well, enough about that, lets talk about your solution! Works like a charm! Thanks!

GullRaDriel

do not forget to link againt the right libraries:

-lwsock32 -lws2_32

VictorVVV

I read somewhere in this forum that the SVN builds where better than the 1,0 RC2.

Vanneto

Speaking of sockets. Im trying to build this library. If I try:

C:\Program Files\CodeBlocks\bin>make -C "C:\socketclass" -f "C:\socketclass\Makefile"

It doesent work. Dont know why exactly. Is there an easier way to compile a library? Better yet, is there a better library for sockets out there? Ahh... No, I just want to know if there is an easier way to build a lib, or basically, just how to do it. Because once I know this, I can compile any lib. Sure will make my life easier!

Thanks!

Thread #592680. Printed from Allegro.cc