[Solved] Error LNK2005 and LNK1169 [closed]


Solution (solved my own problem)

In Global.h, I changed the code to:

#pragma once
#include <SFML\Graphics.hpp>


extern sf::RenderWindow Window;
extern std::string status;

and in Cubes.cpp, I changed it to:

#include <iostream>
#include "Cubes.h"
#include "Common functions.h"
#include "Global.h"
#include <SFML\Graphics.hpp>
#include <vector>
#include <string>

sf::RenderWindow Window(sf::VideoMode(500, 500), "Maximize window to play the game");
std::string status = "NULL";

solved Error LNK2005 and LNK1169 [closed]