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

Author Topic: IDE error for loading image  (Read 1102 times)

0 Members and 1 Guest are viewing this topic.

LeluLelu

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
IDE error for loading image
« on: February 06, 2018, 04:04:36 pm »
Hi!! I have a error from IDE(code::blocks) while i m trying to load image.
Here is the code
 
   
        sf::Texture texture;
        if (!texture.loadFromFile("brickwall.jpg"))
        {
                cout << "FAIL";
        }
        else
        {
                cout<<"DIDN'T FAIL";
        }
               
And here is the error:
||=== Build: Debug in OpenGLprj10 (compiler: GNU GCC Compiler) ===|
||Warning: corrupt .drectve at end of def file|   
obj\Debug\main.o||In function `main':|
D:\CodeBlocks\projects\OpenGLprj10\main.cpp|38|undefined reference to `_imp___ZN2sf7Texture12loadFromFileERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKNS_4RectIiEE'|
||error: ld returned 1 exit status|
||=== Build failed: 2 error(s), 1 warning(s) (0 minute(s), 1 second(s)) ===|

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10916
    • View Profile
    • development blog
    • Email
Re: IDE error for loading image
« Reply #1 on: February 06, 2018, 04:59:12 pm »
What Code::Blocks version are you using?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

LeluLelu

  • Newbie
  • *
  • Posts: 7
    • View Profile
    • Email
Re: IDE error for loading image
« Reply #2 on: February 06, 2018, 05:04:19 pm »
A newer version.. .I discovered just a few minutes ago. I have to use an old one(16.01 i think) for sfml .Thx for reply anyway!!!