Hey, can anyone help me about this?
My code:
#include <SFML/Graphics.hpp>
#include <iostream>
int main()
{
sf::RenderWindow window(sf::VideoMode(1280, 720), "SFML Test Program", sf::Style::Close | sf::Style::Resize);
sf::RectangleShape player(sf::Vector2f(100.0f,100.0f));
player.setPosition(206.0f, 206.0f);
sf::Texture playerTexture;
playerTexture.loadFromFile("dino.jpg");
player.setTexture(&playerTexture);
while(window.isOpen()) {
sf::Event evnt;
while(window.pollEvent(evnt)){
switch (evnt.type)
{
case sf::Event::Closed:
window.close();
break;
window.clear();
window.draw(player);
window.display();
}
return 0;
}}}
The error I get every time:
||=== Build: Debug in sfmlprogram (compiler: GNU GCC Compiler) ===|
obj\Debug\main.o||In function `main':|
C:\Users\DJuca\Desktop\Programiranje Cpp\sfmlprogram\main.cpp|10|undefined reference to `_imp___ZN2sf7Texture12loadFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_4RectIiEE'|
||error: ld returned 1 exit status|
||=== Build failed: 2 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|
- So if anyone know what is it all about please answer me
thank you