title: Visual Studio 2008 c++ linker refuses to link?
body: <p>I am banging my head against a wall here. </p>
  
  <p>All i want is to link a static .lib file in a cpp windows forms application! So, i have an include folder in my project folder that holds header files for that .lib (lib is Yaml-cpp if someone wonders). And i have a lib folder that has the .lib files for that library.</p>
  
  <p>I tested it on a blank project</p>
  
  <p>1.I make a new windows forms project in VS2008, in C++.</p>
  
  <p>2.I go to project properties - c/c++ general and additional include directories that have yaml-cpp header files</p>
  
  <p>3.I go to linker and add path to my lib directory</p>
  
  <p>4.I go to linker - input and add my .lib file</p>
  
  <p>5.I check linker command line and it contains my .lib file so it must be all set.</p>
  
  <p>6.Then i write the sample code in an onbutton function body (which appears in form1.h fie).</p>
  
  <p>Sample code is from here <a href="http://code.google.com/p/yaml-cpp/wiki/HowToParseADocument" rel="nofollow">http://code.google.com/p/yaml-cpp/wiki/HowToParseADocument</a> and its just as simple as:</p>
  
  <pre><code>#include &lt;fstream&gt;
  #include "yaml.h"
  </code></pre>
  
  <p>and then:</p>
  
  <pre><code>std::ifstream fin("test.yaml");
  YAML::Parser parser(fin);
  
  YAML::Node doc;
  while(parser.GetNextDocument(doc)) {
      //do nothing yet
  }
  </code></pre>
  
  <p>7.And then i compile and have 10 "unresolved externals".</p>
  
  <p>I have looked into another project that uses same library, and it has exactly same directory structure, same name of .lib added in linker - input - additional dependencies, same .lib and .h files. And it works for that project- but it doesnt work for me.</p>
  
  <p>What in the world is wrong?</p>
  
  <p>EDIT: I tried making new windows 32 console application and it worked correctly. I then tried to make another fresh windows forms application and it failed.</p>
  
  <p>It is confirmed now. Same steps for linking a library work in console application and fail in windows forms application. WHY?</p>