Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: - Solved - [TravisCI] SFML is not up to date  (Read 2408 times)

0 Members and 1 Guest are viewing this topic.

Zirk

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
- Solved - [TravisCI] SFML is not up to date
« 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
« Last Edit: June 11, 2017, 11:59:03 pm by Zirk »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: [TravisCI] SFML is not up to date
« Reply #1 on: June 11, 2017, 06:13:26 pm »
You could build SFML from source before building your project.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Zirk

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
Re: [TravisCI] SFML is not up to date
« Reply #2 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.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
Re: [TravisCI] SFML is not up to date
« Reply #3 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 that I've setup with TravisCI (it might not be perfect, but it works). ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Zirk

  • Newbie
  • *
  • Posts: 5
    • View Profile
    • Email
Re: [TravisCI] SFML is not up to date
« Reply #4 on: June 11, 2017, 11:58:49 pm »
I'll check that, thanks a lot !

 

anything