title: 'std::shared_ptr' has not been declared , #include<memory> doesn't work
body: <p>I know there are a lot of similar questions around, but most of them solve the problem including memory.
  I had this issue before and that solution seemed to have fixed the problem last time, but not this one.</p>
  
  <p>I am working on a university project with a mate who uses a macbook, I use Windows 10 but usually is not a problem.
  We are working with Clion and Cmake and we use SFML library.</p>
  
  <p>At this time, the project works very well on her macbook but it is not running on mine. The code is the same, the directories are the same and in the same locations.
  Last time I had this problem and I solved, as I was saying, including <code>&lt;memory&gt;</code> in our <code>ResourceHolder.h</code> file. 
  Now I can't include that file in our <code>Character.h</code> file (Don't know why, it's like they can't find each other, but the <code>CMakelist.txt</code> contains all our files). I tried by moving through our files-tree of course, but nothing worked.
  If I include <code>memory</code> in <code>Character.h</code>, then the project runs until 96% and then a lot of undefined reference errors show up.</p>
  
  <p>Can someone help me or explaining me how to solve for once this problem with shared pointers? I'd like to know why I can't include that file (<code>ResourceHolder</code>) in another file of the same project, too.</p>
  
  <hr>
  
  <p>EDIT: The compiler is MinGW, the code below is with NO  included</p>
  
  <hr>
  
  <p>EDIT&lt;2>: I cleaned a lot of nested #include, then I changed the Cmake like that</p>
  
  <pre><code>  target_link_libraries(BlackRose core ${SFML_LIBRARIES} )
  </code></pre>
  
  <h2>now seems to work.</h2>
  
  <p>This is the <code>CMakeLists.txt</code> file:</p>
  
  <pre><code>cmake_minimum_required(VERSION 3.8)
  project(BlackRose)
  
  cmake_policy(SET CMP0074 OLD)
  set(SFML_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/Libraries/SFML)
  
  set(CMAKE_CXX_STANDARD 11)
  
  message("Adding test subdir")
  add_subdirectory(test)
  
  
  set(SOURCE_FILES source/Game.cpp include/Game.h 
  include/management/ResourceHolder.h source/ProceduralMap.cpp 
  include/ProceduralMap.h
      include/management/ResourceIdentifier.h source/World.cpp include/World.h 
      source/Characters/Character.cpp include/Characters/Character.h
      include/Inventory.h source/Characters/PlayerCharacter.cpp 
      include/Characters/PlayerCharacter.h source/Objects/Weapon.cpp
      include/Objects/Weapon.h source/Objects/Shield.cpp i 
      include/Objects/Shield.h source/Characters/Enemy.cpp 
      include/Characters/Enemy.h
      source/Entity.cpp include/Entity.h source/Objects/Object.cpp 
      include/Objects/Object.h source/Objects/ConsumableObject.cpp
      include/Objects/ConsumableObject.h source/Objects/RangedWeapon.cpp 
      include/Objects/RangedWeapon.h source/Objects/MeleeWeapon.cpp
      include/Objects/MeleeWeapon.h source/Projectile.cpp include/Projectile.h 
      include/Random.h source/Random.cpp
      source/Objects/Tile.cpp include/Objects/Tile.h 
      source/Objects/Healpack.cpp include/Objects/Healpack.h 
      source/textDisplay.cpp include/textDisplay.h)
   add_executable(BlackRose source/main.cpp)
  
  
   set(CMAKE_MODULE_PATH ${SFML_ROOT}/sfml_cmake)
   find_package(SFML REQUIRED system window graphics network audio)
   include_directories(${SFML_INCLUDE_DIR})
  
   message("Add library")
   add_library(core ${SOURCE_FILES})
   target_link_libraries(BlackRose ${SFML_LIBRARIES} core)
  
   get_directory_property(output INCLUDE_DIRECTORIES)
   message("Include directories:" ${output})
  </code></pre>
  
  <p>This is the Header:</p>
  
  <pre><code>#ifndef BLACKROSE_CHARACTER_H
  #define BLACKROSE_CHARACTER_H
  
  
  #include &lt;SFML/System.hpp&gt; 
  #include "../Inventory.h"
  #include "../Objects/Weapon.h"
  #include "../Objects/Shield.h"
  #include "../Entity.h"
  #include &lt;memory&gt;
  
  
  
  
  class Character: public Entity {
  public:
   Character();
   //virtual ~Character() = 0;
   virtual void move();
   virtual void fight();
   //basic interaction with the world, it will be associated with a key
   virtual bool interactWithObject(std::shared_ptr &lt;Object&gt; &amp;object);
   virtual void die();
   void update();
   void display();
  
  public:
   int hp;
   int hpMax;
   int attackDamage;
  
   bool barDisplayed = false;
   sf::RectangleShape bar;
   sf::RectangleShape lifeBar;
  
  protected:
   int resistance;
   int speed;
   sf::Vector2f position;
   Inventory inventory;
   sf::Clock timerTextures;
  };
  
  
  #endif //BLACKROSE_CHARACTER_H
  </code></pre>
  
  <p>The .cpp file:</p>
  
  <pre><code>#include "../../include/Characters/Character.h"
  
  
  
  Character::Character() {
    //all characters are this big
    rect.setSize(sf::Vector2f(32,32));
  
    //life bar
    bar = sf::RectangleShape(sf::Vector2f(32,5));
    lifeBar = sf::RectangleShape(sf::Vector2f(32,5));
    bar.setOutlineThickness(3);
    bar.setOutlineColor(sf::Color::Black);
    bar.setFillColor(sf::Color::Black);
    lifeBar.setFillColor(sf::Color::Green);
   /*
    bar.setPosition(position.x, position.y-16);
    lifeBar.setPosition(position.x, position.y-16);
  */
  
  
   //TODO istanzia un inventory
   }
  
   bool Character::interactWithObject(std::shared_ptr &lt;Object&gt; &amp;object) {
   return true;
   }
  
   ...other methods
  </code></pre>
  
  <p>these are errors show up when I do not include memory:</p>
  
  <pre><code>In file included from C:\Users\Ludovico\CLionProjects\BlackRose\source\Characters\Character.cpp:5:0:
  c:\users\ludovico\clionprojects\blackrose\include\characters\character.h:26:42: error: 'std::shared_ptr' has not been declared
       virtual bool interactWithObject(std::shared_ptr &lt;Object&gt; &amp;object);
  
                                            ^
  c:\users\ludovico\clionprojects\blackrose\include\characters\character.h:26:53: error: expected ',' or '...' before '&lt;' token
       virtual bool interactWithObject(std::shared_ptr &lt;Object&gt; &amp;object);
  
                                                       ^
  C:\Users\Ludovico\CLionProjects\BlackRose\source\Characters\Character.cpp:37:41: error: 'bool Character::interactWithObject' is not a static data member of 'class Character'
   bool Character::interactWithObject(std::shared_ptr &lt;Object&gt; &amp;object) {
  
                                           ^
  C:\Users\Ludovico\CLionProjects\BlackRose\source\Characters\Character.cpp:37:36: error: 'shared_ptr' is not a member of 'std'
   bool Character::interactWithObject(std::shared_ptr &lt;Object&gt; &amp;object) {
  
                                      ^
  C:\Users\Ludovico\CLionProjects\BlackRose\source\Characters\Character.cpp:37:59: error: expected primary-expression before '&gt;' token
   bool Character::interactWithObject(std::shared_ptr &lt;Object&gt; &amp;object) {
  
                                                             ^
  C:\Users\Ludovico\CLionProjects\BlackRose\source\Characters\Character.cpp:37:62: error: 'object' was not declared in this scope
   bool Character::interactWithObject(std::shared_ptr &lt;Object&gt; &amp;object) {
  
                                                                ^
  C:\Users\Ludovico\CLionProjects\BlackRose\source\Characters\Character.cpp:37:70: error: expected ',' or ';' before '{' token
   bool Character::interactWithObject(std::shared_ptr &lt;Object&gt; &amp;object) {
  
                                                                        ^
  CMakeFiles\core.dir\build.make:104: recipe for target 'CMakeFiles/core.dir/source/Characters/Character.cpp.obj' failed
  mingw32-make.exe[2]: *** [CMakeFiles/core.dir/source/Characters/Character.cpp.obj] Error 1
  mingw32-make.exe[2]: *** Waiting for unfinished jobs....
  In file included from c:\users\ludovico\clionprojects\blackrose\include\characters\playercharacter.h:9:0,
                   from C:\Users\Ludovico\CLionProjects\BlackRose\source\Characters\PlayerCharacter.cpp:5:
  c:\users\ludovico\clionprojects\blackrose\include\characters\Character.h:26:42: error: 'std::shared_ptr' has not been declared
       virtual bool interactWithObject(std::shared_ptr &lt;Object&gt; &amp;object);
                                            ^
  c:\users\ludovico\clionprojects\blackrose\include\characters\Character.h:26:53: error: expected ',' or '...' before '&lt;' token
       virtual bool interactWithObject(std::shared_ptr &lt;Object&gt; &amp;object);
                                                       ^
  mingw32-make.exe[2]: *** [CMakeFiles/core.dir/source/Characters/PlayerCharacter.cpp.obj] Error 1
  mingw32-make.exe[1]: *** [CMakeFiles/core.dir/all] Error 2
  CMakeFiles\core.dir\build.make:118: recipe for target 'CMakeFiles/core.dir/source/Characters/PlayerCharacter.cpp.obj' failed
  CMakeFiles\Makefile2:108: recipe for target 'CMakeFiles/core.dir/all' failed
  mingw32-make.exe: *** [all] Error 2
  Makefile:128: recipe for target 'all' failed
  </code></pre>
  
  <p>Thanks you for the patience and for your help.</p>