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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - OverMath

Pages: [1]
1
Graphics / [SOLVED]Failed to load image without reasons
« on: June 15, 2020, 09:28:35 am »
Hi, I'm a beginner with SFML, so I study the tutorial, I try to load an image, but when I try my code, the debugger output and the standard output displays :"Failed to load image "©└icon.png ╠╠╠╠╠╠      ╠╠╠╠╠╠╠╠", so it doesn't help me to understand my problem... I use the EDI Visual Studio, and I know the problem isn't in linkers, I thought to link sfml-xxx.lib and sfml-xxx-d.lib at my project. And my image is in the root of my project, with my main.cpp file. If anyone have an idea to help me...
#include <SFML/Graphics.hpp>

int main()
{
    sf::Texture texture;
    if (!texture.loadFromFile("icon.png"))
        return EXIT_FAILURE;

    return 0;
}
 

PS: Finaly, I found the problem, it was in the linker, I mixed sfml-xxx-.lib and sfml-xxx-d.lib in configurations... Now it works !!  ;D
 

Pages: [1]
anything