I tried to run the basic code to create and open a window . The code is as follows :

#include <iostream>
#include <SFML/Window.hpp>

int main()
{
    // Create the main window
    sf::Window App(sf::VideoMode(800, 600, 32), "SFML Window");

    // Start main loop
    bool Running = true;
    while (Running)
    {
        App.Display();
    }

    return EXIT_SUCCESS;
}

I am getting the following error:

1>------ Build started: Project: sfml-test, Configuration: Debug Win32 ------
1>Build started 9/22/2012 12:16:53 AM.
1>InitializeBuildStatus:
1> Touching "Debug\sfml-test.unsuccessfulbuild".
1>ClCompile:
1> All outputs are up-to-date.
1>ManifestResourceCompile:
1> All outputs are up-to-date.
1>window.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall sf::Window::~Window(void)" (??1Window@sf@@UAE@XZ) referenced in function _main
1>window.obj : error LNK2019: unresolved external symbol "public: void __thiscall sf::Window::Display(void)" (?Display@Window@sf@@QAEXXZ) referenced in function _main
1>window.obj : 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
1>window.obj : 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
1>F:\Visual Studio Projects\sfml-test\Debug\sfml-test.exe : fatal error LNK1120: 4 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.67
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

What could be the problem? Have I not set up the SFML correctly? Is it not detecting the libraries or functions? And also I get this " Touching "Debug\sfml-test.unsuccessfulbuild" as output as you can see above everytime I run a program . Why do I get 'unsuccessfulbuild' and what does it mean?

Edited 4 Years Ago by Dev93

I set it up exactly like in this video . I am still getting the error . I don't know what I am supposed to do to get rid of it .

This article has been dead for over six months. Start a new discussion instead.