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

Author Topic: Ubuntu + Code:Blocks - SFML2 Snapshot  (Read 1850 times)

0 Members and 1 Guest are viewing this topic.

jynks

  • Newbie
  • *
  • Posts: 4
    • View Profile
    • Email
Ubuntu + Code:Blocks - SFML2 Snapshot
« on: April 25, 2012, 05:51:32 am »
I am trying to get the SFML2 Snap shot working in code:blocks for SFML2... but unable to do so.. I followed the instructions and was able to get cmake to build everything (I think)

I extracted the SFML2 snapshot file into ~/Development/SFML2 and ran cmake there, as you can see all the files seamed to have been created?



In Code:Blocks I seam to be unable to compile the test clock application.....




but when i try to compile the test code...

I get this strange error about the functions not being in sf:: ??

#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;
}

error: 'Class sf::Clock' has no member named 'GetElapsedTime'
error: Sleep' is not a member function of 'sf'

« Last Edit: April 25, 2012, 05:59:34 am by jynks »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Re: Ubuntu + Code:Blocks - SFML2 Snapshot
« Reply #1 on: April 25, 2012, 08:03:21 am »
Please look at the 2.0 documentation, not the 1.6 tutorials.
Laurent Gomila - SFML developer

 

anything