Test.h
Test.cpp
main.cpp
Hi I'm trying to compile the above code on Visual studio 2017 and I get "error LNK2005: "public: __thiscall sf::Rect<float>::Rect<float>(void)" (??0?$Rect@M@sf@@QAE@XZ) already defined in Test.obj"
The error is gone when I comment out the #include <TGUI/TGUI.hpp>
Is this a problem with TGUI?
Code (cpp) Select
#pragma once
struct Test
{
void test();
};
Test.cpp
Code (cpp) Select
#include "Test.h"
#include <SFML/Graphics.hpp>
void Test::test()
{
sf::FloatRect r;
}
main.cpp
Code (cpp) Select
#include <SFML/Graphics.hpp>
#include <TGUI/TGUI.hpp>
int main()
{
sf::FloatRect r;
return 0;
}
Hi I'm trying to compile the above code on Visual studio 2017 and I get "error LNK2005: "public: __thiscall sf::Rect<float>::Rect<float>(void)" (??0?$Rect@M@sf@@QAE@XZ) already defined in Test.obj"
The error is gone when I comment out the #include <TGUI/TGUI.hpp>
Is this a problem with TGUI?