title: GTest and Visual Studio 2017 - external symbols
body: <p><strong>Basic Info</strong>
  Hi,
  I use VS2017 and I want to add Google Test to my project. I thought that it works because I added few tests like that:</p>
  
  <pre><code>    /**
  * @brief UtilitiesTest -&gt; Utilities.hpp -&gt; convertToUnitPosition test
  */
  TEST(UtilitiesTest, convertToUnitPosition)
  {
      sf::Vector2f pxPos = { 100,100 };
      sf::Vector2f cellDim = { 25,25 };
  
      auto uPos = Utilities::convertToUnitPosition(pxPos, cellDim);
      EXPECT_TRUE(uPos.x == 4);
      EXPECT_TRUE(uPos.y == 4);
  
      pxPos = { 99,100 };
      uPos = Utilities::convertToUnitPosition(pxPos, cellDim);
  
      EXPECT_TRUE(uPos.x == 3);
      EXPECT_TRUE(uPos.y == 4);
  }
  </code></pre>
  
  <p>and this works, but when I add the next test:</p>
  
  <pre><code>  TEST(UtilitiesTest, isInWindow)
  {
      auto scene = std::make_shared&lt;Scene&gt;("GTest", sf::Vector2f(200, 200));
  }
  </code></pre>
  
  <p>Now I have got this error:</p>
  
  <pre><code>    Severity    Code    Description Project File    Line    Suppression State
  Error   LNK2019 unresolved external symbol "public: __thiscall Scene::Scene(class std::basic_string&lt;char,struct std::char_traits&lt;char&gt;,class std::allocator&lt;char&gt; &gt; const &amp;,class sf::Vector2&lt;float&gt; const &amp;)" (??0Scene@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$Vector2@M@sf@@@Z) referenced in function "public: __thiscall std::_Ref_count_obj&lt;class Scene&gt;::_Ref_count_obj&lt;class Scene&gt;&lt;char const (&amp;)[6],class sf::Vector2&lt;float&gt; &gt;(char const (&amp;)[6],class sf::Vector2&lt;float&gt; &amp;&amp;)" (??$?0AAY05$$CBDV?$Vector2@M@sf@@@?$_Ref_count_obj@VScene@@@std@@QAE@AAY05$$CBD$$QAV?$Vector2@M@sf@@@Z)  GTest   
  </code></pre>
  
  <p><strong>How I added GTest to project</strong>
  1. Add new project to solution
  2. Choose Google Test
  3. static libary / link dynamically
  4. I added SFML propeties to project (because I am using SFML)</p>
  
  <p><strong>Problem</strong>
  Some of my own classes and methods works, other does not and I am so confused because I try a <strong>lot of ways from stack and It does not help me.</strong></p>