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

Author Topic: SFML 2 quit linking? VS2010  (Read 8225 times)

0 Members and 1 Guest are viewing this topic.

NobodyNothing

  • Newbie
  • *
  • Posts: 10
    • View Profile
SFML 2 quit linking? VS2010
« on: February 16, 2012, 02:59:24 pm »
I'm having the same problem mentioned in this thread.
http://www.sfml-dev.org/forum/viewtopic.php?t=6070&sid=a4a891e0460aa401ef1d25e9f31af37b

I tried to implement this resource managers from the wiki, and ever since it stopped linking.
http://www.sfml-dev.org/wiki/en/sources/resource_manager_hiura

my exact build output is:
Code: [Select]
1>------ Build started: Project: Meatlocker, Configuration: Debug Win32 ------
1>Build started 2/16/2012 8:56:11 AM.
1>InitializeBuildStatus:
1>  Touching "Debug\Meatlocker.unsuccessfulbuild".
1>ClCompile:
1>  All outputs are up-to-date.
1>CommandMenu.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::RectangleShape::~RectangleShape(void)" (__imp_??1RectangleShape@sf@@UAE@XZ) referenced in function __unwindfunclet$??0CommandMenu@@QAE@H@Z$0
1>CommandMenu.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Shape::SetOutlineThickness(float)" (__imp_?SetOutlineThickness@Shape@sf@@QAEXM@Z) referenced in function "public: __thiscall CommandMenu::CommandMenu(int)" (??0CommandMenu@@QAE@H@Z)
1>CommandMenu.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Shape::SetOutlineColor(class sf::Color const &)" (__imp_?SetOutlineColor@Shape@sf@@QAEXABVColor@2@@Z) referenced in function "public: __thiscall CommandMenu::CommandMenu(int)" (??0CommandMenu@@QAE@H@Z)
1>CommandMenu.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Shape::SetFillColor(class sf::Color const &)" (__imp_?SetFillColor@Shape@sf@@QAEXABVColor@2@@Z) referenced in function "public: __thiscall CommandMenu::CommandMenu(int)" (??0CommandMenu@@QAE@H@Z)
1>CommandMenu.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Color::Color(unsigned char,unsigned char,unsigned char,unsigned char)" (__imp_??0Color@sf@@QAE@EEEE@Z) referenced in function "public: __thiscall CommandMenu::CommandMenu(int)" (??0CommandMenu@@QAE@H@Z)
1>Engine.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Color::Color(unsigned char,unsigned char,unsigned char,unsigned char)" (__imp_??0Color@sf@@QAE@EEEE@Z)
1>CommandMenu.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::RectangleShape::SetSize(class sf::Vector2<float> const &)" (__imp_?SetSize@RectangleShape@sf@@QAEXABV?$Vector2@M@2@@Z) referenced in function "public: __thiscall CommandMenu::CommandMenu(int)" (??0CommandMenu@@QAE@H@Z)
1>CommandMenu.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::RectangleShape::RectangleShape(class sf::Vector2<float> const &)" (__imp_??0RectangleShape@sf@@QAE@ABV?$Vector2@M@1@@Z) referenced in function "public: __thiscall CommandMenu::CommandMenu(int)" (??0CommandMenu@@QAE@H@Z)
1>Engine.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::View::View(void)" (__imp_??0View@sf@@QAE@XZ) referenced in function "public: __thiscall Engine::Engine(int,int,int)" (??0Engine@@QAE@HHH@Z)
1>Engine.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class sf::View const & __thiscall sf::RenderTarget::GetDefaultView(void)const " (__imp_?GetDefaultView@RenderTarget@sf@@QBEABVView@2@XZ) referenced in function "private: bool __thiscall Engine::Init(void)" (?Init@Engine@@AAE_NXZ)
1>Engine.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::RenderWindow::RenderWindow(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_??0RenderWindow@sf@@QAE@VVideoMode@1@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IABUContextSettings@1@@Z) referenced in function "private: bool __thiscall Engine::Init(void)" (?Init@Engine@@AAE_NXZ)
1>Engine.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class sf::VideoMode __cdecl sf::VideoMode::GetDesktopMode(void)" (__imp_?GetDesktopMode@VideoMode@sf@@SA?AV12@XZ) referenced in function "private: bool __thiscall Engine::Init(void)" (?Init@Engine@@AAE_NXZ)
1>Engine.obj : error LNK2001: unresolved external symbol "private: virtual void __thiscall sf::RenderWindow::OnCreate(void)" (?OnCreate@RenderWindow@sf@@EAEXXZ)
1>Engine.obj : error LNK2001: unresolved external symbol "private: virtual void __thiscall sf::RenderWindow::OnResize(void)" (?OnResize@RenderWindow@sf@@EAEXXZ)
1>Engine.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall sf::RenderWindow::GetWidth(void)const " (?GetWidth@RenderWindow@sf@@UBEIXZ)
1>Engine.obj : error LNK2001: unresolved external symbol "public: virtual unsigned int __thiscall sf::RenderWindow::GetHeight(void)const " (?GetHeight@RenderWindow@sf@@UBEIXZ)
1>Engine.obj : error LNK2001: unresolved external symbol "private: virtual bool __thiscall sf::RenderWindow::Activate(bool)" (?Activate@RenderWindow@sf@@EAE_N_N@Z)
1>Engine.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::RenderWindow::~RenderWindow(void)" (__imp_??1RenderWindow@sf@@UAE@XZ) referenced in function "public: virtual void * __thiscall sf::RenderWindow::`scalar deleting destructor'(unsigned int)" (??_GRenderWindow@sf@@UAEPAXI@Z)
1>Engine.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::RenderTexture::~RenderTexture(void)" (__imp_??1RenderTexture@sf@@UAE@XZ) referenced in function "private: void __thiscall Engine::RenderFrame(void)" (?RenderFrame@Engine@@AAEXXZ)
1>Engine.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::Display(void)" (__imp_?Display@Window@sf@@QAEXXZ) referenced in function "private: void __thiscall Engine::RenderFrame(void)" (?RenderFrame@Engine@@AAEXXZ)
1>Engine.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::RenderTarget::Draw(class sf::Drawable const &,class sf::RenderStates const &)" (__imp_?Draw@RenderTarget@sf@@QAEXABVDrawable@2@ABVRenderStates@2@@Z) referenced in function "private: void __thiscall Engine::RenderFrame(void)" (?RenderFrame@Engine@@AAEXXZ)
1>Tile.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::RenderTarget::Draw(class sf::Drawable const &,class sf::RenderStates const &)" (__imp_?Draw@RenderTarget@sf@@QAEXABVDrawable@2@ABVRenderStates@2@@Z)
1>Engine.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class sf::RenderStates const sf::RenderStates::Default" (__imp_?Default@RenderStates@sf@@2V12@B)
1>Tile.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static class sf::RenderStates const sf::RenderStates::Default" (__imp_?Default@RenderStates@sf@@2V12@B)
1>Engine.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::RenderTexture::RenderTexture(void)" (__imp_??0RenderTexture@sf@@QAE@XZ) referenced in function "private: void __thiscall Engine::RenderFrame(void)" (?RenderFrame@Engine@@AAEXXZ)
1>Engine.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::RenderTarget::SetView(class sf::View const &)" (__imp_?SetView@RenderTarget@sf@@QAEXABVView@2@@Z) referenced in function "private: void __thiscall Engine::RenderFrame(void)" (?RenderFrame@Engine@@AAEXXZ)
1>Engine.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::RenderTarget::Clear(class sf::Color const &)" (__imp_?Clear@RenderTarget@sf@@QAEXABVColor@2@@Z) referenced in function "private: void __thiscall Engine::RenderFrame(void)" (?RenderFrame@Engine@@AAEXXZ)
1>Engine.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::Close(void)" (__imp_?Close@Window@sf@@QAEXXZ) referenced in function "private: void __thiscall Engine::ProcessInput(void)" (?ProcessInput@Engine@@AAEXXZ)
1>Engine.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Window::PollEvent(class sf::Event &)" (__imp_?PollEvent@Window@sf@@QAE_NAAVEvent@2@@Z) referenced in function "private: void __thiscall Engine::ProcessInput(void)" (?ProcessInput@Engine@@AAEXXZ)
1>Engine.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Window::IsOpen(void)const " (__imp_?IsOpen@Window@sf@@QBE_NXZ) referenced in function "private: void __thiscall Engine::MainLoop(void)" (?MainLoop@Engine@@AAEXXZ)
1>Engine.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Image::~Image(void)" (__imp_??1Image@sf@@QAE@XZ) referenced in function "public: void __thiscall Engine::LoadTileset(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?LoadTileset@Engine@@QAEXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>WorldArea.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Image::~Image(void)" (__imp_??1Image@sf@@QAE@XZ)
1>Engine.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Texture::~Texture(void)" (__imp_??1Texture@sf@@QAE@XZ) referenced in function "public: void __thiscall Engine::LoadTileset(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?LoadTileset@Engine@@QAEXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>Engine.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Texture::Create(unsigned int,unsigned int)" (__imp_?Create@Texture@sf@@QAE_NII@Z) referenced in function "public: void __thiscall Engine::LoadTileset(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?LoadTileset@Engine@@QAEXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>Engine.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Texture::Texture(void)" (__imp_??0Texture@sf@@QAE@XZ) referenced in function "public: void __thiscall Engine::LoadTileset(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?LoadTileset@Engine@@QAEXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>Engine.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: bool __thiscall sf::Image::LoadFromFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_?LoadFromFile@Image@sf@@QAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "public: void __thiscall Engine::LoadTileset(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?LoadTileset@Engine@@QAEXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>Engine.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Image::Image(void)" (__imp_??0Image@sf@@QAE@XZ) referenced in function "public: void __thiscall Engine::LoadTileset(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?LoadTileset@Engine@@QAEXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>WorldArea.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Image::Image(void)" (__imp_??0Image@sf@@QAE@XZ)
1>Engine.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::View::Move(float,float)" (__imp_?Move@View@sf@@QAEXMM@Z) referenced in function "private: void __thiscall Engine::MoveDefaultView(float,float)" (?MoveDefaultView@Engine@@AAEXMM@Z)
1>Engine.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::View::Zoom(float)" (__imp_?Zoom@View@sf@@QAEXM@Z) referenced in function "private: void __thiscall Engine::ZoomDefaultView(float)" (?ZoomDefaultView@Engine@@AAEXM@Z)
1>WorldArea.obj : error LNK2019: unresolved external symbol "public: void __thiscall WorldArea::SetDimensions(int,int)" (?SetDimensions@WorldArea@@QAEXHH@Z) referenced in function "public: void __thiscall WorldArea::LoadWorldArea(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)" (?LoadWorldArea@WorldArea@@QAEXV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>Tile.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::Sprite::~Sprite(void)" (__imp_??1Sprite@sf@@UAE@XZ) referenced in function __unwindfunclet$??0Tile@@QAE@AAVTexture@sf@@@Z$0
1>Tile.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: __thiscall Tile::Tile(class sf::Texture &)" (??0Tile@@QAE@AAVTexture@sf@@@Z)
1>Tile.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::Sprite::Sprite(void)" (__imp_??0Sprite@sf@@QAE@XZ) referenced in function "public: __thiscall Tile::Tile(class sf::Texture &)" (??0Tile@@QAE@AAVTexture@sf@@@Z)
1>Tile.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 Tile::Draw(class sf::RenderTexture *)" (?Draw@Tile@@QAEXPAVRenderTexture@sf@@@Z)
1>C:\Users\Eric\Documents\Dropbox\Programming\C++\Source\Meatlocker\Debug\Meatlocker.exe : fatal error LNK1120: 40 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:03.01
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


If anyone has any suggestions, or knows what's causing this, your help would be very much appreciated.

Thanks!

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SFML 2 quit linking? VS2010
« Reply #1 on: February 16, 2012, 03:11:14 pm »
Which SFML libraries do you link to?
Laurent Gomila - SFML developer

NobodyNothing

  • Newbie
  • *
  • Posts: 10
    • View Profile
SFML 2 quit linking? VS2010
« Reply #2 on: February 16, 2012, 03:15:11 pm »
I downloaded the latest 2.0 snapshot last night, 'g091fbd9' and built it to be sure it wasn't a problem with my previous build.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SFML 2 quit linking? VS2010
« Reply #3 on: February 16, 2012, 03:46:28 pm »
I mean, which files? (please give the exact filenames)
Laurent Gomila - SFML developer

NobodyNothing

  • Newbie
  • *
  • Posts: 10
    • View Profile
SFML 2 quit linking? VS2010
« Reply #4 on: February 16, 2012, 03:56:22 pm »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SFML 2 quit linking? VS2010
« Reply #5 on: February 16, 2012, 04:18:37 pm »
You're linking to all these files at the same time??

Choose only one variant:
- sfml-xxx is release dynamic
- sfml-xxx-s is release static
- sfml-xxx-d is debug dynamic
- sfml-xxx-s-d is debug static

And don't mix debug and release, as stated in the tutorial.
Laurent Gomila - SFML developer

StormWingDelta

  • Sr. Member
  • ****
  • Posts: 365
    • View Profile
SFML 2 quit linking? VS2010
« Reply #6 on: February 16, 2012, 04:33:56 pm »
This could be my problem too.  I've noticed the SFML Coder videos have people putting all the lib files in the same folder rather than seperately.
I have many ideas but need the help of others to find way to make use of them.

NobodyNothing

  • Newbie
  • *
  • Posts: 10
    • View Profile
SFML 2 quit linking? VS2010
« Reply #7 on: February 16, 2012, 04:42:53 pm »
Wow, ok, I feel rather stupid now.

I was following the SFML Coder tutorial, just incorrectly. All of the files being in the same folder (the one you point VS to for a library directory) isn't the problem, I just forgot to go into Linker->Input and specify the additional dependencies .