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

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Marcvs

Pages: [1]
1
Window / LNK2019 : unresolved external symbol
« on: September 01, 2011, 03:54:25 am »
Hi everyone!
I'm new in this forum and my english is awful (I'm italian)... Please, be patient :)

So... This is my first post and I need your help :(
I try to do the "handling time" tutorial, but the linker gives me an "unresolved external symbol" error (LNK2019). It say that the reference to the namespace Clock (sf::Clock) is unresolved but I'm sure I linked all necessary libraries (sfml-window.lib and sfml-window-d.lib).

This is what I wrote (main.cpp):
Code: [Select]
#include <SFML/Window.hpp>
#include <iostream>

int main() {

sf::Window App(sf::VideoMode(800,600,32),"SFML Window - handling time");

sf::Clock Clock;
float time = 0;

while(App.IsOpened()) {

sf::Event Event;
        while (App.GetEvent(Event)) {
if((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape))
App.Close();
}

time = Clock.GetElapsedTime();
Clock.Reset();

std::cout << "Elapsed time: " << time << std::endl;

App.Display();
}

return EXIT_SUCCESS;

}


And this is what the linker says:

Code: [Select]
Errore 1 error LNK2019: riferimento al simbolo esterno "public: void __thiscall sf::Clock::Reset(void)" (?Reset@Clock@sf@@QAEXXZ) non risolto nella funzione _main main.obj 6_Window - Handling time
Errore 2 error LNK2019: riferimento al simbolo esterno "public: float __thiscall sf::Clock::GetElapsedTime(void)const " (?GetElapsedTime@Clock@sf@@QBEMXZ) non risolto nella funzione _main main.obj 6_Window - Handling time
Errore 3 error LNK2019: riferimento al simbolo esterno "public: __thiscall sf::Clock::Clock(void)" (??0Clock@sf@@QAE@XZ) non risolto nella funzione _main main.obj 6_Window - Handling time
Errore 4 fatal error LNK1120: 3 esterni non risolti C:\Users\XXX\Documents\Visual Studio 2008\Projects\SFML-1.6\6_Window - Handling time\Debug\6_Window - Handling time.exe 1 6_Window - Handling time


I'm under Windows 7 (64 bit), I use Visual Studio 2008 Pro and the version of the SFML is the 1.6.

What did I wrong? (except my english... :lol:)

Pages: [1]
anything