SFML community forums

Help => General => Topic started by: Zirk on June 11, 2017, 05:30:03 pm

Title: - Solved - [TravisCI] SFML is not up to date
Post by: Zirk on June 11, 2017, 05:30:03 pm
Hi,
I wanted to use TravisCI with one of my project, so I made a .travis.yml and I told him to install the SFML:
addons:
  apt:
    packages:
      - libsfml-dev
But when it's compiling, there is the following error:
src/UI/Text.cpp:12:9: error: ‘class sf::Text’ has no member named ‘setFillColor’
I don't have this problem on my computer, so I think the problem is that the SFML is not up to date.
Is there a way to force update it or something like that ?

Thanks in advance
Title: Re: [TravisCI] SFML is not up to date
Post by: eXpl0it3r on June 11, 2017, 06:13:26 pm
You could build SFML from source before building your project.
Title: Re: [TravisCI] SFML is not up to date
Post by: Zirk on June 11, 2017, 10:29:12 pm
Hi,
I tried to build it myself like that:
install: cd /usr/local && sudo wget https://www.sfml-dev.org/files/SFML-2.4.2-linux-gcc-64-bit.tar.gz && sudo tar -xzf SFML-2.4.2-linux-gcc-64-bit.tar.gz && sudo cp -r SFML-2.4.2/include . && sudo cp -r SFML-2.4.2/lib . && sudo cp -r SFML-2.4.2/share . && sudo rm -rf SFML-2.4.2 && cd -

Everything is compiling, but when it's linking, there are some errors:
/home/travis/build/Xwilarg/FightEpitechGrade2/src/Components/SpriteRenderer.cpp:38: undefined reference to `sf::Image::~Image()'
/home/travis/build/Xwilarg/FightEpitechGrade2/src/Components/SpriteRenderer.cpp:38: undefined reference to `sf::Image::~Image()'
src/Components/SphereRenderer.o: In function `SphereRenderer::SphereRenderer()':
/home/travis/build/Xwilarg/FightEpitechGrade2/src/Components/SphereRenderer.cpp:4: undefined reference to `sf::CircleShape::CircleShape(float, unsigned long)'

Do you have an idea why it's happening ?

Thanks in advance :3.
Title: Re: [TravisCI] SFML is not up to date
Post by: eXpl0it3r on June 11, 2017, 11:48:35 pm
Sounds like you're not linking SFML correctly or at all.

Feel free to take a peek at my SFML project (https://github.com/eXpl0it3r/SmallGameEngine) that I've setup with TravisCI (it might not be perfect, but it works). ;)
Title: Re: [TravisCI] SFML is not up to date
Post by: Zirk on June 11, 2017, 11:58:49 pm
I'll check that, thanks a lot !