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

Author Topic: strange error while compiling a basic application  (Read 1406 times)

0 Members and 1 Guest are viewing this topic.

Duke

  • Newbie
  • *
  • Posts: 1
    • View Profile
strange error while compiling a basic application
« on: August 08, 2009, 08:44:27 pm »
i have followed the SMFL tutorial(visual studio)  :cry:

Quote

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


Code: [Select]

#include <SFML/Window.hpp>

int main()
{
sf::Window myApp(sf::VideoMode(640, 480, 32), "Hello World");

bool running = true;

while(running)
{
myApp.Display();
}

return 0;
}



@down
ok works now thx

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
strange error while compiling a basic application
« Reply #1 on: August 08, 2009, 09:29:52 pm »
You didn't link to sfml-window.lib.
Laurent Gomila - SFML developer