title: A couple of Eclipse C/C++ questions
body: <p>I've been using VS2008/2010 for a while and I'm going to learn using Eclipse Helions for C/C++ development (mainly C). </p>
  
  <p>I am abit confused about libraries and includes though.</p>
  
  <p>1) How do you properly include winsock2.h for example? I've tried this:</p>
  
  <pre><code>#ifndef CONFIG_H_
  #define CONFIG_H_
  
  
  /*  Windows-Build   */
  #if defined(WIN32) || defined(_WIN32)
  #include &lt;winsock2.h&gt;
  #endif
  
  SOCKET sock;
  
  #endif /* CONFIG_H_ */
  </code></pre>
  
  <p>But the compiler dosn't recognise SOCKET. Do you have to manually add the full path to winsock2 somewhere? </p>
  
  <p>2) What about ws2_32.lib? Where do you include that in Eclipse? Do you have to add a path as well?</p>
  
  <p>3) Having used VS mostly I'm new to makefiles. How do you include custom makefiles? Is there a good guide for starting with makefiles? </p>
  
  <p>4) Is there a intellisense like in VS?</p>
  
  <p>That's what I can figure out right now.
  Thanks!</p>
  
  <p>EDIT:
  In response to the first answer:</p>
  
  <pre><code>Building target: Filesharing_core.dll
  Invoking: Cygwin C Linker
  gcc -L"C:\cygwin\lib\w32api" -shared -o"Filesharing_core.dll"  ./src/test.o   -llibws2_32.a
  /usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../../i686-pc-cygwin/bin/ld: cannot find -llibws2_32.a
  collect2: ld returned 1 exit status
  make: *** [Filesharing_core.dll] Error 1
  </code></pre>