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

Author Topic: Unknown unrepairable error LNK  (Read 3047 times)

0 Members and 1 Guest are viewing this topic.

FrewCen

  • Newbie
  • *
  • Posts: 8
    • View Profile
Unknown unrepairable error LNK
« on: February 28, 2012, 07:35:01 am »
Hi all.

Today I've started to use SFML Window package and in first tutorial I found problem (for me). My code:
Code: [Select]
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <iostream>

using namespace std;
using namespace sf;
int main()
{
sf::Window App(sf::VideoMode(800, 600, 32), "SFML Window");
App.Create(sf::VideoMode(800, 600, 32), "SFML Window", sf::Style::Fullscreen);
bool Running = true;
while (Running)
{
App.Display();
}

return EXIT_SUCCESS;
}


My error:
http://img401.imageshack.us/img401/3355/c608e44e56cc48108f3e1a6.png
And when I'm not using fullscreen:
http://img46.imageshack.us/img46/7518/76d5406b8dad48f2b90750a.png
Does anybody know how to repair it? Please help me.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Unknown unrepairable error LNK
« Reply #1 on: February 28, 2012, 08:07:07 am »
It's the expected behaviour. Follow the next tutorial to get something more useful on screen.
Laurent Gomila - SFML developer

FrewCen

  • Newbie
  • *
  • Posts: 8
    • View Profile
..
« Reply #2 on: February 28, 2012, 09:38:56 am »
I have done next tutoriasl, but I'm getting error with somethig like "debug hook" when I'm trying to do App.Clear(); metohod. What should I do now? It breaks my code everytime when I'm starting application.

Grimshaw

  • Hero Member
  • *****
  • Posts: 631
  • Nephilim SDK
    • View Profile
Unknown unrepairable error LNK
« Reply #3 on: February 28, 2012, 01:44:26 pm »
Probably missing the libraries between debug and release..

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Unknown unrepairable error LNK
« Reply #4 on: February 28, 2012, 02:14:56 pm »
Laurent Gomila - SFML developer

FrewCen

  • Newbie
  • *
  • Posts: 8
    • View Profile
....
« Reply #5 on: February 28, 2012, 03:41:06 pm »
Working code:
Code: [Select]
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <iostream>
#include <SFML/Graphics.hpp>

using namespace std;
using namespace sf;
int main()
{
sf::RenderWindow WND(sf::VideoMode(800, 600, 32), "Test WND");
while(WND.IsOpened())
{
sf::Event Event;
while(WND.GetEvent(Event))
{
if(Event.Type = sf::Event::Closed)
WND.Close();
}
WND.Display();
}
return 0;
}


Not working:
Code: [Select]
#include <SFML/System.hpp>
#include <SFML/Window.hpp>
#include <iostream>
#include <SFML/Graphics.hpp>

using namespace std;
using namespace sf;
int main()
{
sf::RenderWindow WND(sf::VideoMode(800, 600, 32), "Test WND");
while(WND.IsOpened())
{
sf::Event Event;
while(WND.GetEvent(Event))
{
if(Event.Type = sf::Event::Closed)
WND.Close();
}
WND.Clear();
WND.Display();
}
return 0;
}

Error:

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Unknown unrepairable error LNK
« Reply #6 on: February 28, 2012, 04:05:30 pm »
You must recompile SFML if you use VC++ 2010, the binaries that you downloaded are for 2008.
Laurent Gomila - SFML developer

FrewCen

  • Newbie
  • *
  • Posts: 8
    • View Profile
?
« Reply #7 on: February 28, 2012, 04:57:16 pm »
And how and what should I recompile?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Unknown unrepairable error LNK
« Reply #8 on: February 29, 2012, 07:58:46 am »
There are billions of posts about it on this forum, if you search enough you can even find video tutorials and precompiled libraries.
Laurent Gomila - SFML developer

 

anything