title: Building Projects in Visual Studio
body: <p>I am new to Windows and Visual Studio.  I have a strong background in programming in Linux though.  I'm trying to build (is build just one word for compile and link) a this sample code from a textbook.  I made an empty project added the source and header files to the project.  The code compiles fine.  However, I get all these errors at link time.  What's happening is that the code calls a bunch of functions that VS can't find.  Specifically all the errors are</p>
  
  <p>ping.obj : error LNK2019 unresolved external symbol</p>
  
  <p>The example code is from Ch11 or Network Programming for Windows.  It's about creating raw sockets to use to make a ping program.  Also, the code came with a Makefile but I don't know how to use it with VS...</p>
  
  <p>So, basically I need to know how to just put some code into VS and have it build properly. If anyone could help me with that or point me to a decent resource I'd really appreciate it.</p>
  
  <p>edit:  I'm using VS 2008 and C++</p>
  
  <p>edit2: I made a makefile project and filled in the build command with 
  cl ping.cpp resolve.cpp -out:ping.exe Ws2_32.lib</p>
  
  <p>now it's telling me my build was successful, but there's no .exe anywhere... arg!!  Windows makes no sense to me.</p>
  
  <p>Here is what it's telling me:</p>
  
  <pre><code>1&gt;------ Build started: Project: ping, Configuration: Debug Win32 ------
  1&gt;Performing Makefile project actions
  1&gt;Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.21022.08 for 80x86
  1&gt;Copyright (C) Microsoft Corporation.  All rights reserved.
  1&gt;cl : Command line warning D9035 : option 'o' has been deprecated and will be removed           in a future release
  1&gt;ping.cpp
  1&gt;resolve.cpp
  1&gt;Generating Code...
  1&gt;Microsoft (R) Incremental Linker Version 9.00.21022.08
  1&gt;Copyright (C) Microsoft Corporation.  All rights reserved.
  1&gt;/out:ping.exe 
  1&gt;/out:ut:ping.exe 
  1&gt;ping.obj 
  1&gt;resolve.obj 
  1&gt;Ws2_32.lib 
  1&gt;Build log was saved at "file://c:\Documents and Settings\Devin.DEVIN-DESK\My     
  Documents\Visual Studio 2008\Projects\raw_socks\ping\Debug\BuildLog.htm"
  1&gt;ping - 0 error(s), 1 warning(s)
  ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
  </code></pre>
  
  <p>edit3:  this makes sense to me.  I have two headers and two source files and I can't seem to compile and link, no matter what I do.  What's a very straightforward and easy process in linux is convoluted in Windows.</p>