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

Author Topic: Cannot create a new window  (Read 1327 times)

0 Members and 1 Guest are viewing this topic.

da_coolest

  • Newbie
  • *
  • Posts: 19
    • View Profile
Cannot create a new window
« on: April 26, 2011, 10:45:38 am »
Hi. I just installed SFML and trying to learn using it. I'm not a very experienced programmer either. I was trying to follow the tutorial available in the same website http://www.sfml-dev.org/tutorials/1.6/window-window.php and I'm getting these compile errors.

Quote
1>------ Build started: Project: testoop, Configuration: Debug Win32 ------
1>Compiling...
1>oop.cpp
1>Linking...
1>oop.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall sf::Window::~Window(void)" (__imp_??1Window@sf@@UAE@XZ)
1>oop.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: void __thiscall sf::Window::Display(void)" (__imp_?Display@Window@sf@@QAEXXZ)
1>oop.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>oop.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\TOSHIBA\Documents\Visual Studio 2008\Projects\MY_PROJECTS\testoop\Debug\testoop.exe : fatal error LNK1120: 4 unresolved externals
1>Build log was saved at "file://c:\Users\TOSHIBA\Documents\Visual Studio 2008\Projects\MY_PROJECTS\testoop\testoop\Debug\BuildLog.htm"
1>testoop - 5 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Cannot create a new window
« Reply #1 on: April 26, 2011, 10:55:35 am »
You must link to sfml-window (the same way you linked to sfml-system).
Laurent Gomila - SFML developer

da_coolest

  • Newbie
  • *
  • Posts: 19
    • View Profile
Cannot create a new window
« Reply #2 on: April 26, 2011, 11:05:11 am »
Quote from: "Laurent"
You must link to sfml-window (the same way you linked to sfml-system).


Thanks! That solved the problem :)

 

anything