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

Author Topic: Getting Linker errors trying to install 1.6 VS2010  (Read 2292 times)

0 Members and 1 Guest are viewing this topic.

Linuxxon

  • Newbie
  • *
  • Posts: 10
    • MSN Messenger - rasmus.linusson@gmail.com
    • View Profile
    • http://www.linuxxon.com
Getting Linker errors trying to install 1.6 VS2010
« on: March 04, 2011, 10:49:49 pm »
Hi, so I'm getting linker errors from the first windows tutorial in the 1.6 section...

The first sf::Clock tutorial works but when I follow the window tutorial I get these errors:
Code: [Select]
1>------ Build started: Project: SFML-Test, Configuration: Debug Win32 ------
1>  main.cpp
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::Window::~Window(void)" (__imp_??1Window@sf@@UAE@XZ) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::Display(void)" (__imp_?Display@Window@sf@@QAEXXZ) referenced in function _main
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 long,struct sf::WindowSettings const &)" (__imp_??0Window@sf@@QAE@VVideoMode@1@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@KABUWindowSettings@1@@Z) referenced in function _main
1>main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (__imp_??0VideoMode@sf@@QAE@III@Z) referenced in function _main
1>E:\C++\SFML-Test\Debug\SFML-Test.exe : fatal error LNK1120: 4 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


Here is the source of the program (grabbed from the tutorial)
Code: [Select]
#include <SFML/Window.hpp>

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

return EXIT_SUCCESS;
}


I've recompiled the libraries and added the "sfml-system-s-d.lib;sfml-main.lib;" to the Input under Linker in the project options. I've also added the "SFML_DYNAMIC" to the preprocessor.

I use Win7 x64 with VS2010.

I'd really like to start using SFML :)[/code]

Irbis

  • Newbie
  • *
  • Posts: 7
    • View Profile
Getting Linker errors trying to install 1.6 VS2010
« Reply #1 on: March 04, 2011, 11:08:00 pm »
I think that you should add sfml-window-d.lib in case you're building a debug configuration.

Linuxxon

  • Newbie
  • *
  • Posts: 10
    • MSN Messenger - rasmus.linusson@gmail.com
    • View Profile
    • http://www.linuxxon.com
Getting Linker errors trying to install 1.6 VS2010
« Reply #2 on: March 04, 2011, 11:15:45 pm »
Still the same error message... :/

 

anything