SFML community forums

Help => Window => Topic started by: FrewCen on February 28, 2012, 07:35:01 am

Title: Unknown unrepairable error LNK
Post by: FrewCen 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.
Title: Unknown unrepairable error LNK
Post by: Laurent on February 28, 2012, 08:07:07 am
It's the expected behaviour. Follow the next tutorial to get something more useful on screen.
Title: ..
Post by: FrewCen 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.
Title: Unknown unrepairable error LNK
Post by: Grimshaw on February 28, 2012, 01:44:26 pm
Probably missing the libraries between debug and release..
Title: Unknown unrepairable error LNK
Post by: Laurent on February 28, 2012, 02:14:56 pm
Please give more details
http://www.sfml-dev.org/forum/viewtopic.php?p=36367#36367
Title: ....
Post by: FrewCen 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:
(http://img17.imageshack.us/img17/1617/8423558f0aeb48dea61ba54.png)
Title: Unknown unrepairable error LNK
Post by: Laurent 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.
Title: ?
Post by: FrewCen on February 28, 2012, 04:57:16 pm
And how and what should I recompile?
Title: Unknown unrepairable error LNK
Post by: Laurent 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.