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

Author Topic: LNK2001: unresolved external symbol  (Read 5450 times)

0 Members and 1 Guest are viewing this topic.

justcolorado

  • Newbie
  • *
  • Posts: 16
    • View Profile
LNK2001: unresolved external symbol
« on: October 08, 2011, 11:39:10 pm »
Hello,

    I am new here.  Just installed your SDK and am trying to work my way through the tutorials.  I got up to the http://www.sfml-dev.org/tutorials/1.6/window-window.php section and then I started getting these error messages.  It couldn't be the code, because it is a direct copy (download) from the tutorials.  Here is the message I got:

Code: [Select]
1>------ Build started: Project: SFML-tutorials, Configuration: Debug Win32 ------
1>Compiling...
1>main.cpp
1>Linking...
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::Window::~Window(void)" (__imp_??1Window@sf@@UAE@XZ)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::Display(void)" (__imp_?Display@Window@sf@@QAEXXZ)
1>main.obj : error LNK2001: 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)
1>main.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (__imp_??0VideoMode@sf@@QAE@III@Z)
1>C:\Users\colorado\Documents\Visual Studio 2008\Projects\SFML-tutorials\Debug\SFML-tutorials.exe : fatal error LNK1120: 4 unresolved externals
1>Build log was saved at "file://c:\Users\colorado\Documents\Visual Studio 2008\Projects\SFML-tutorials\SFML-tutorials\Debug\BuildLog.htm"
1>SFML-tutorials - 5 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


    I had posted the same problem on GameDev but this forum is probably a much better place for question.  

    Does anybody know what I did wrong?


Thanks,
Colorado

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
LNK2001: unresolved external symbol
« Reply #1 on: October 09, 2011, 09:00:08 am »
You didn't link to sfml-window.
Laurent Gomila - SFML developer

justcolorado

  • Newbie
  • *
  • Posts: 16
    • View Profile
Thank you
« Reply #2 on: October 11, 2011, 11:49:10 am »
Yes that did the trick.  Thank you.  

Really enjoying working with SFML !

 :)  :)