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

Author Topic: [Solved] Cryptic error when trying to load texture from file  (Read 1343 times)

0 Members and 1 Guest are viewing this topic.

Optimistic

  • Newbie
  • *
  • Posts: 14
    • View Profile
[Solved] Cryptic error when trying to load texture from file
« on: February 14, 2018, 12:04:09 am »
Hey there,
When trying to load a font, compiler tells me:
Code: [Select]
error: passing 'const sf::Texture' as 'this' argument of 'bool sf::Texture::loadFromFile(const string&, const IntRect&)' discards qualifiers [-fpermissive]Here's the offending code:
if(!this->Start_Button_Texture.loadFromFile("StartBTN200x100.png", sf::IntRect(0, 0, 200, 100))){
        //Err
    }

This is the first error the compiler spits out.

By the way, I'm compiling for Android armeabi (Target) on Windows 10 (Host).
« Last Edit: February 15, 2018, 01:28:56 pm by Optimistic »

Optimistic

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Cryptic error when trying to load texture from file
« Reply #1 on: February 14, 2018, 01:00:14 am »
Ooops... Sorry... Can't call non const qualified functions on const objects....

 

anything