SFML won't run, unresolved external symbol?

So I've been trying to work on SFML, and have got the following output:
1>------ Build started: Project: Pong, Configuration: Debug Win32 ------
1> main.cpp
1>c:\users\owner\documents\visual studio 2010\projects\pong\pong\main.cpp(155): warning C4244: 'argument' : conversion from 'time_t' to 'unsigned int', possible loss of data
1>c:\users\owner\documents\visual studio 2010\projects\pong\pong\main.cpp(216): warning C4244: '+=' : conversion from 'double' to 'int', possible loss of data
1>c:\users\owner\documents\visual studio 2010\projects\pong\pong\main.cpp(272): warning C4244: '+=' : conversion from 'const double' to 'float', possible loss of data
1>c:\users\owner\documents\visual studio 2010\projects\pong\pong\main.cpp(275): warning C4244: '+=' : conversion from 'double' to 'float', possible loss of data
1>c:\users\owner\documents\visual studio 2010\projects\pong\pong\main.cpp(281): warning C4244: '-=' : conversion from 'const double' to 'float', possible loss of data
1>c:\users\owner\documents\visual studio 2010\projects\pong\pong\main.cpp(284): warning C4244: '-=' : conversion from 'double' to 'float', possible loss of data
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Image::Create(unsigned int,unsigned int,class sf::Color const &)" (__imp_?Create@Image@sf@@QAEXIIABVColor@2@@Z) referenced in function "public: void __thiscall Display::load_resources(void)" (?load_resources@Display@@QAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Texture::LoadFromFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class sf::Rect<int> const &)" (__imp_?LoadFromFile@Texture@sf@@QAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV?$Rect@H@2@@Z) referenced in function "public: void __thiscall Display::load_resources(void)" (?load_resources@Display@@QAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Font::LoadFromFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_?LoadFromFile@Font@sf@@QAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "public: void __thiscall Display::load_resources(void)" (?load_resources@Display@@QAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Sprite::SetTexture(class sf::Texture const &,bool)" (__imp_?SetTexture@Sprite@sf@@QAEXABVTexture@2@_N@Z) referenced in function "public: void __thiscall Display::loadSprites(void)" (?loadSprites@Display@@QAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Transformable::SetPosition(float,float)" (__imp_?SetPosition@Transformable@sf@@QAEXMM@Z) referenced in function "public: void __thiscall Ball::updateSprite(void)" (?updateSprite@Ball@@QAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Texture::~Texture(void)" (__imp_??1Texture@sf@@QAE@XZ) referenced in function __unwindfunclet$??0Display@@QAE@XZ$0
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Texture::Texture(void)" (__imp_??0Texture@sf@@QAE@XZ) referenced in function "public: __thiscall Display::Display(void)" (??0Display@@QAE@XZ)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static bool __cdecl sf::Keyboard::IsKeyPressed(enum sf::Keyboard::Key)" (__imp_?IsKeyPressed@Keyboard@sf@@SA_NW4Key@12@@Z) referenced in function "public: void __thiscall Game::update(void)" (?update@Game@@QAEXXZ)
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Window::Window(class sf::VideoMode,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,unsigned int,struct sf::ContextSettings const &)" (__imp_??0Window@sf@@QAE@VVideoMode@1@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IABUContextSettings@1@@Z) referenced in function _main
1>C:\Users\Owner\documents\visual studio 2010\Projects\Pong\Debug\Pong.exe : fatal error LNK1120: 9 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


I've looked around and found it seems to be some sort of linker error... But what do I do for this?
Check these:
Did you link the static libraries in build options?
1
2
3
4
5
6
7
8
Debugger:
-lsfml-graphics-s-d
-lsfml-window-s-d
-lsfml-system-s-d
Build:
-lsfml-graphics-s
-lsfml-window-s
-lsfml-system-s


Make sure you linked the codeblocks "setting and compiler" right.

try re downloading the file, it looks like you're missing some information in the SFML folder.

Also seems like you need to switch some variables around, seems like you need to declare them differently.
Last edited on
Topic archived. No new replies allowed.