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

Author Topic: Can't install SFML  (Read 5161 times)

0 Members and 1 Guest are viewing this topic.

Greek

  • Newbie
  • *
  • Posts: 6
    • View Profile
Can't install SFML
« on: October 01, 2009, 05:26:29 pm »
I have Windows Visual C++ 2008 Express Edition.

I used this application to install it:

http://www.sfml-dev.org/tutorials/1.5/start-vc.php

and this is my test application:

Code: [Select]
#include <SFML/System.hpp>
#include <iostream>

int main()
{
    sf::Clock Clock;
    while (Clock.GetElapsedTime() < 5.f)
    {
        std::cout << Clock.GetElapsedTime() << std::endl;
        sf::Sleep(0.5f);
    }

    return 0;
}

If made all right but when i start i get this:

Quote
1>------ Erstellen gestartet: Projekt: test3, Konfiguration: Debug Win32 ------
1>Kompilieren...
1>test3_1.cpp
1>Manifest in Ressourcen wird kompiliert...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>Verknüpfen...
1>test3_1.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""void __cdecl sf::Sleep(float)" (?Sleep@sf@@YAXM@Z)" in Funktion "_main".
1>test3_1.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: float __thiscall sf::Clock::GetElapsedTime(void)const " (?GetElapsedTime@Clock@sf@@QBEMXZ)" in Funktion "_main".
1>test3_1.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol ""public: __thiscall sf::Clock::Clock(void)" (??0Clock@sf@@QAE@XZ)" in Funktion "_main".
1>C:\Dokumente und Einstellungen\ackermann\Desktop\Programmieren\C++\SFML\test3\Debug\test3.exe : fatal error LNK1120: 3 nicht aufgelöste externe Verweise.
1>Das Buildprotokoll wurde unter "file://c:\Dokumente und Einstellungen\ackermann\Desktop\Programmieren\C++\SFML\test3\test3\Debug\BuildLog.htm" gespeichert.
1>test3 - 4 Fehler, 0 Warnung(en)
========== Erstellen: 0 erfolgreich, Fehler bei 1, 0 aktuell, 0 übersprungen ==========



Then a appear: Can not find test3.exe ...

What did i wrong?

Thanks, Greek

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Can't install SFML
« Reply #1 on: October 01, 2009, 05:47:34 pm »
You didn't link to sfml-system.lib, as explained in the tutorial.
Laurent Gomila - SFML developer

Greek

  • Newbie
  • *
  • Posts: 6
    • View Profile
Can't install SFML
« Reply #2 on: October 01, 2009, 06:39:20 pm »

Greek

  • Newbie
  • *
  • Posts: 6
    • View Profile
Can't install SFML
« Reply #3 on: October 01, 2009, 06:44:42 pm »
Sry wrong Error:

This application can't be run, because sfml-system.dll was not found.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Can't install SFML
« Reply #4 on: October 01, 2009, 06:45:36 pm »
I can't say more than the application: sfml-system.dll was not found. It should be either in a directory which is in the PATH, or in the same directory as the executable.
Laurent Gomila - SFML developer

Greek

  • Newbie
  • *
  • Posts: 6
    • View Profile
Can't install SFML
« Reply #5 on: October 01, 2009, 07:00:15 pm »
mhh, ; did missed ...

but now i get the next error:

The application "C:\Dokumente und Einstellungen\...\Desktop\Programmieren\C++\SFML\SFML Test\Debug\SFML Test.exe" can't be started.

The System can not find the file.

Greek

  • Newbie
  • *
  • Posts: 6
    • View Profile
Can't install SFML
« Reply #6 on: October 01, 2009, 07:49:00 pm »
i push compile but he doesn't creates a exe :(

why? normal programs work.

Luinechor

  • Guest
Can't install SFML
« Reply #7 on: October 01, 2009, 07:50:59 pm »
Hey guys, I'm just posting in this topic, because I also have problems installing SFML on my windows machine (it works perfectly on mac).

I copied the files correctly and also wrote a simple program, which uses the graphics-package of SFML. I linked it correctly and the program compiles without errors.

When I run the compiled .exe it's displaying a error, saying the sfml-graphics.dll could not be found. When copying the .dll to the Visual Studio Project-Folder (debug) it crashes.

Any suggestions?

Update: It works now. I had to link the library with the '-d' prefix.

Greek

  • Newbie
  • *
  • Posts: 6
    • View Profile
Can't install SFML
« Reply #8 on: October 01, 2009, 08:42:48 pm »
Quote from: "Luinechor"
Update: It works now. I had to link the library with the '-d' prefix.


Same here works now,

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Can't install SFML
« Reply #9 on: October 01, 2009, 08:53:12 pm »
This paragraph is labeled as "important" in the "getting started" tutorial, between the paragraph about linking the SFML libraries and the corresponding screenshot.

What could I do to make it more obvious? :cry:
Laurent Gomila - SFML developer

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
Can't install SFML
« Reply #10 on: October 01, 2009, 08:56:39 pm »
Quote from: "Laurent"
What could I do to make it more obvious? :cry:
Nothing. They are good enough.

Or maybe... A big bling bling flashing message "READ THE TUTORIALS FIRST".  :roll:
SFML / OS X developer

Luinechor

  • Guest
Can't install SFML
« Reply #11 on: October 01, 2009, 09:57:09 pm »
Quote from: "Laurent"

What could I do to make it more obvious? :cry:


As Hiura said: Nothing. I should be more careful. And perhaps it's just because I don't have to link by myself usually.

phear-

  • Jr. Member
  • **
  • Posts: 64
    • MSN Messenger - LOApokalypse@hotmail.com
    • View Profile
    • http://gtproductions.org
Can't install SFML
« Reply #12 on: October 02, 2009, 04:28:28 am »
Quote from: "Hiura"
Quote from: "Laurent"
What could I do to make it more obvious? :cry:
Nothing. They are good enough.

Or maybe... A big bling bling flashing message "READ THE TUTORIALS FIRST".  :roll:


I second the bling bling option.
Eugene Alfonso
GTP | Twitter

 

anything