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

Author Topic: error LNK2001: HELP  (Read 1154 times)

0 Members and 1 Guest are viewing this topic.

SFloyd

  • Newbie
  • *
  • Posts: 1
    • View Profile
error LNK2001: HELP
« on: March 06, 2011, 04:44:07 am »
Ok, first of, here is the whole error(total of 4):

Code: [Select]
Error 1 error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::Window::~Window(void)" (__imp_??1Window@sf@@UAE@XZ) G:\Development\Testing\Window\hoper.obj Window
Error 2 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) G:\Development\Testing\Window\hoper.obj Window
Error 3 error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (__imp_??0VideoMode@sf@@QAE@III@Z) G:\Development\Testing\Window\hoper.obj Window
Error 4 error LNK1120: 3 unresolved externals G:\Development\Testing\Window\Release\Window.exe Window



I followed the begginner tutorial to the letter. I set up my linkers for BOTH debug and release "correctly"(I am positive). I set "SFML_DYNAMIC". I have no more ideas for what might be wrong.
Here is the code:
Code: [Select]

#include <SFML\Window.hpp>

int main()
{
sf::Window App(sf::VideoMode(800, 600, 32), "SFML Window");
}


Please help!
(Was I supposed to link sfml-main-d.lib and sfml-main.lib as well?)

Edit: I did compile the src files with VS2010, and this was all ran and setup in VS2010 as well

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
error LNK2001: HELP
« Reply #1 on: March 06, 2011, 10:05:06 am »
You must link sfml-window.
Laurent Gomila - SFML developer