Hello,
I cannot compile my project because g++ seems to have a problem with my includes and using-namespaces.
My main file starts like this:
#include <iostream>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <deque>
#include <array>
#include <vector>
#include <SFML/Graphics.hpp>
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
using namespace std;
using namespace sf;
class Card;
class Motion;
class Player;
#include "GS.hpp"
#include "Card.hpp"
#include "Player.hpp"
#include "Motion.hpp"
#include "Functions.hpp"
#include "Card.cpp"
#include "Player.cpp"
#include "Motion.cpp"
#include "Functions.cpp"
When I compile my file, I get a bunch of
Babel.cpp:(.text+0x1a5): undefined reference to `sf::Sprite::setTexture(sf::Texture const&, bool)'
Babel.cpp:(.text+0x1ca): undefined reference to `sf::Transformable::setRotation(float)'
/tmp/ccWFVqF0.o: In function `Card::SleeveSet(sf::Texture*)':
Babel.cpp:(.text+0x28e): undefined reference to `sf::Sprite::setTexture(sf::Texture const&, bool)'
/tmp/ccWFVqF0.o: In function `Card::SetRotation(double)':
Babel.cpp:(.text+0x2ea): undefined reference to `sf::Transformable::setRotation(float)'
/tmp/ccWFVqF0.o: In function `Card::Blit()':
Babel.cpp:(.text+0x305): undefined reference to `sf::RenderStates::Default'
Babel.cpp:(.text+0x312): undefined reference to `sf::RenderTarget::draw(sf::Drawable const&, sf::RenderStates const&)'
/tmp/ccWFVqF0.o: In function `Card::Scale(double)':
Babel.cpp:(.text+0x36f): undefined reference to `sf::Transformable::setScale(float, float)'
Babel.cpp:(.text+0x38e): undefined reference to `sf::Sprite::setTexture(sf::Texture const&, bool)'
Babel.cpp:(.text+0x3b3): undefined reference to `sf::Transformable::setScale(float, float)'
Babel.cpp:(.text+0x3f0): undefined reference to `sf::Transformable::setScale(float, float)'
Babel.cpp:(.text+0x40c): undefined reference to `sf::Sprite::setTexture(sf::Texture const&, bool)'
Babel.cpp:(.text+0x431): undefined reference to `sf::Transformable::setScale(float, float)'
[...]
Someone knows how to handle this? Thanks.