socket.h library not found

Hello

Well, I already browsed cplusplus.com sometimes, and it seemed to be a really good forum to ask C++ related questions. :)
Anyway, my first question:
I try to write a program that communicates and connect with FTP-servers, for that, I of course need sockets.

But whenever I include the sys/socket.h library in my header, it doesn't work.
#include <sys/socket.h>
It says: "Library not found".

I'm reading a pdf book about sockets, they also use that library there.
I've already did some re-search but didn't find a solution.

I could use Winsocks right? But I don't think that's the best solution, I also want to keep it 'responsive' for Linux and Windows.

My IDE is Visual Studio 2013, by the way.

I'd appreciate the help! :)

Thanks for reading,
Niely
The <sys/socket.h> include file is a Linux include file it probably doesn't exist on Windows. And if it does exist it is probably not in the proper directory. And as far as keeping it "responsive" for both Linux and Windows I recommend you pick one operating system or the other. There is quite a difference between winsock and Linux sockets.

^Auch... :/
Seems I have to create two programs then. :)
Or is it smart to use the #ifdef for the libraries (the main purpose of the program is speed).
Well since the #ifdef is a pre-processor directive, meaning compile time, pick your poison. Unless you're familiar with both libraries you may be better off starting with the one you will use on your primary operating system and after you get that working work on either another program for the other operating system or your #ifdef version.

Okay, I'll do that one then! ;)
Thanks for all your help and extremely fast replies. :)
Topic archived. No new replies allowed.