simple SFML project gives lots of LNK errors

I was learning SDL but then heard that SFML is like a more dated version, so i started learning SFML. here is the errors im getting
1
2
3
4
5
6
7
8
9
10
11
12
1
1>  main.cpp
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall sf::Window::Display(void)" (?Display@Window@sf@@QAEXXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: bool __thiscall sf::Input::IsKeyDown(enum sf::Key::Code)const " (?IsKeyDown@Input@sf@@QBE_NW4Code@Key@2@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: class sf::Input const & __thiscall sf::Window::GetInput(void)const " (?GetInput@Window@sf@@QBEABVInput@2@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: float __thiscall sf::Window::GetFrameTime(void)const " (?GetFrameTime@Window@sf@@QBEMXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: void __thiscall sf::Window::Close(void)" (?Close@Window@sf@@QAEXXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: bool __thiscall sf::Window::GetEvent(class sf::Event &)" (?GetEvent@Window@sf@@QAE_NAAVEvent@2@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: bool __thiscall sf::Window::IsOpened(void)const " (?IsOpened@Window@sf@@QBE_NXZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (??0VideoMode@sf@@QAE@III@Z) referenced in function _main
1>c:\users\david\documents\visual studio 2010\Projects\SFML project\Debug\SFML project.exe : fatal error LNK1120: 8 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


I'm assuming it has to do with my not settings it up right I'll tell you how i have it set up.

In the addition dependencies i have
sfml-system.lib; sfml-windows.lib; sfml-graphics.lib;

The include directory is fine and the lib directory is fine so idk. Here is my code but i dont think you'll need it.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#include <SFML/Graphics.hpp>

int main(int argc, char** argv)
{
	// Create the main rendering window
    sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SFML Graphics");

	//Load the sprite image from a file
	sf::Image Image;
	if( !Image.LoadFromFile("sprite.bmp") )
		return EXIT_FAILURE;

	//create the sprite
	sf::Sprite Sprite(Image);

	//Change its properties
	Sprite.SetColor(sf::Color( 0, 255, 255, 128 ) );
	Sprite.SetPosition(200.f, 100.f );
	Sprite.SetScale( 2.f, 2.f );

	//Main game loop
	while( App.IsOpened() )
	{
		//Handle Events
		sf::Event Event;
		while( App.GetEvent( Event ) )
		{
			//Close window : exit
			if( Event.Type == sf::Event::Closed )
			{
				App.Close();
			}

			//Get elapsed time
			float ElapsedTime = App.GetFrameTime();

			//Move the spire
			if( App.GetInput().IsKeyDown(sf::Key::Left) )
				Sprite.Move( -100 * ElapsedTime, 0 );

			if( App.GetInput().IsKeyDown(sf::Key::Right) )
				Sprite.Move( 100 * ElapsedTime, 0 );

			if( App.GetInput().IsKeyDown(sf::Key::Up ) )
				Sprite.Move( 0, -100 * ElapsedTime);

			if( App.GetInput().IsKeyDown(sf::Key::Down ) )
				Sprite.Move(0, 100 * ElapsedTime);

			//Rotate the sprite
			if( App.GetInput().IsKeyDown(sf::Key::Add) )
				Sprite.Rotate( -100 * ElapsedTime );
			if( App.GetInput().IsKeyDown(sf::Key::Subtract ) )
				Sprite.Rotate( +100 * ElapsedTime);

			//Display sprite in window
			App.Draw(Sprite);

			//Display window contents on screen
			App.Display();
		}
	}

	return EXIT_SUCCESS;
}

closed account (zwA4jE8b)
I don't know what the SFML includes are but I am guessing you need something like...
#include <SFML/Input.hpp
and so on
@Creative:
There is no such thing as Input.hpp
You did put the library name under Linker->Input->Additional Dependencies right?

http://www.sfml-dev.org/tutorials/1.5/start-cb.php

^ A tutorial on how to link with the certain libraries that you need or SFML to link/compile.
@ Aleios:
If you read the OP you would have seen that in Additional dependencies i put
sfml-system.lib; sfml-windows.lib; sfml-graphics.lib;
Okay i fixed this problem but now i have another. it was supposed to be sfml-window.lib instead of sfml-windows.lib
but now i have another


...which is...?
Topic archived. No new replies allowed.