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

Author Topic: VS2008: Tutorial Opening a window  (Read 2332 times)

0 Members and 1 Guest are viewing this topic.

FuggleNutz

  • Newbie
  • *
  • Posts: 4
    • View Profile
VS2008: Tutorial Opening a window
« on: August 03, 2009, 10:03:47 am »
Hi,

I've worked through the first few basic tutorials on random numbers etc. These work fine, but I am having trouble with the opening a window tutorial, it's always either an stdafx.h problem, of which I have disabled pre compiled headers. Then if I do this I get about 10 or so errors, most of it not understandable. It is probably just me choosing the wrong project type. If anyone knows anything about it, it would be helpful, or a link to someone who had the same problem.

Cheers

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
VS2008: Tutorial Opening a window
« Reply #1 on: August 03, 2009, 10:39:06 am »
When you create your project using the wizard, uncheck "precompiled headers" and check "empty project".
Laurent Gomila - SFML developer

FuggleNutz

  • Newbie
  • *
  • Posts: 4
    • View Profile
VS2008: Tutorial Opening a window
« Reply #2 on: August 03, 2009, 04:12:02 pm »
Cheers, I will check later when I get chance. Thanks  :)

FuggleNutz

  • Newbie
  • *
  • Posts: 4
    • View Profile
VS2008: Tutorial Opening a window
« Reply #3 on: August 03, 2009, 08:31:53 pm »
Ok, I've done what was said to be done but i get 6 errors,

Code: [Select]
Error 1 error LNK2019: unresolved external symbol "public: virtual __thiscall sf::Window::~Window(void)" (??1Window@sf@@UAE@XZ) referenced in function _main Winmain.obj app
Error 2 error LNK2019: unresolved external symbol "public: void __thiscall sf::Window::Display(void)" (?Display@Window@sf@@QAEXXZ) referenced in function _main Winmain.obj app
Error 3 error LNK2019: unresolved external symbol "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 &)" (??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 Winmain.obj app
Error 4 error LNK2019: unresolved external symbol "public: __thiscall sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (??0VideoMode@sf@@QAE@III@Z) referenced in function _main Winmain.obj app
Error 5 error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup MSVCRTD.lib app
Error 6 fatal error LNK1120: 5 unresolved externals C:\Users\Ant\Documents\Visual Studio 2008\Projects\app\Debug\app.exe app

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
VS2008: Tutorial Opening a window
« Reply #4 on: August 03, 2009, 08:37:04 pm »
You didn't link to sfml-window.lib.
Laurent Gomila - SFML developer

FuggleNutz

  • Newbie
  • *
  • Posts: 4
    • View Profile
VS2008: Tutorial Opening a window
« Reply #5 on: August 03, 2009, 11:51:44 pm »
Thank you! :D