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

Author Topic: Error saying 'Clock has no member "getElapsedTime&qu  (Read 11281 times)

0 Members and 1 Guest are viewing this topic.

alpha bravo

  • Newbie
  • *
  • Posts: 9
    • View Profile
Error saying 'Clock has no member "getElapsedTime&qu
« on: September 15, 2010, 01:34:23 pm »
Ive just tried to set up the SFML with vs2010 and overcame the 'cannot open source file '  trauma, (the problem being with all the tutorials). But now after coding the sfml clock program I am getting the following error:

 " class sf:: Clock has no member "getElapsedTime"  

Obviously something missing somewhere but dont know what?
Any help would be greatly appreciated. Thank you.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Error saying 'Clock has no member "getElapsedTime&qu
« Reply #1 on: September 15, 2010, 02:01:16 pm »
It's GetElapsedTime, not getElapsedTime.
Laurent Gomila - SFML developer

alpha bravo

  • Newbie
  • *
  • Posts: 9
    • View Profile
Error saying 'Clock has no member "getElapsedTime&qu
« Reply #2 on: September 16, 2010, 12:22:39 am »
Right. Thankyou very much.
Now getting:
LINK : fatal error LNK1104: cannot open file 'sfml-systems-d.lib'

panithadrum

  • Sr. Member
  • ****
  • Posts: 304
    • View Profile
    • Skyrpex@Github
    • Email
Error saying 'Clock has no member "getElapsedTime&qu
« Reply #3 on: September 16, 2010, 12:39:16 am »
Quote from: "alpha bravo"
Right. Thankyou very much.
Now getting:
LINK : fatal error LNK1104: cannot open file 'sfml-systems-d.lib'

You missed a character :P sfml-system-s-d.lib

alpha bravo

  • Newbie
  • *
  • Posts: 9
    • View Profile
Error saying 'Clock has no member "getElapsedTime&qu
« Reply #4 on: September 16, 2010, 01:01:55 am »
I put the extra letter in and now get;

error LNK 1104: cannot open file 'sfml-systems-s-d.lib'

alpha bravo

  • Newbie
  • *
  • Posts: 9
    • View Profile
Error saying 'Clock has no member "getElapsedTime&qu
« Reply #5 on: September 16, 2010, 01:05:13 am »
I even changed systems to system as per previous post and now get

error LNK 1104: cannot open file 'sfml-system-s-d.lib'

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Error saying 'Clock has no member "getElapsedTime&qu
« Reply #6 on: September 16, 2010, 01:10:14 am »
Did you specify the library's path in your project?

If yes, is the library really there? Otherwise recompile SFML.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

alpha bravo

  • Newbie
  • *
  • Posts: 9
    • View Profile
Error saying 'Clock has no member "getElapsedTime&qu
« Reply #7 on: September 16, 2010, 01:31:44 am »
Quote
Did you specify the library's path in your project?


I believe so. In 'VC++ Directories' and then 'Library Directories'.


And the lib is shown in the sfml folder I downloaded.

panithadrum

  • Sr. Member
  • ****
  • Posts: 304
    • View Profile
    • Skyrpex@Github
    • Email
Error saying 'Clock has no member "getElapsedTime&qu
« Reply #8 on: September 16, 2010, 11:37:14 am »
Quote from: "alpha bravo"
Quote
Did you specify the library's path in your project?


I believe so. In 'VC++ Directories' and then 'Library Directories'.


And the lib is shown in the sfml folder I downloaded.

Well, here are my assumptions:
1- The library path is incorrect.
2- You didn't compile SFML.
3- You are using a recent version of SFML2 (then the actual library name is sfml2-system-s-d.lib).

alpha bravo

  • Newbie
  • *
  • Posts: 9
    • View Profile
Error saying 'Clock has no member "getElapsedTime&qu
« Reply #9 on: September 17, 2010, 02:24:13 pm »
Oh well... thanks for the responses guys.
I think I've attacked this from every angle with no luck.
I resorted to SDL which loaded up fine.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Error saying 'Clock has no member "getElapsedTime&qu
« Reply #10 on: September 17, 2010, 02:36:54 pm »
Quote
I think I've attacked this from every angle with no luck.

This is because you still don't understand what's wrong. If you search the real cause of the problem, then you can easily find a solution ;)

The problem is that the library files are probably not there. If you recompiled SFML with VS 2010, the output files may have not been written to the proper directory (the conversion wizard is not reliable). You just need to find them and copy them to where your compiler searches them ("<sfml>\lib" ?).

There are so many people having troubles with Visual Studio 2010, I'm surprised that nobody came up with a complete how-to, or even corrected project files.
Laurent Gomila - SFML developer

panithadrum

  • Sr. Member
  • ****
  • Posts: 304
    • View Profile
    • Skyrpex@Github
    • Email
Error saying 'Clock has no member "getElapsedTime&qu
« Reply #11 on: September 17, 2010, 02:53:58 pm »
Quote from: "Laurent"
I'm surprised that nobody came up with a complete how-to, or even corrected project files.

I am sure that if you create a explicit post asking for a correct VS2010 project you will get it!

alpha bravo

  • Newbie
  • *
  • Posts: 9
    • View Profile
Error saying 'Clock has no member "getElapsedTime&qu
« Reply #12 on: September 18, 2010, 12:14:10 am »
As a beginner it is extremely difficult to understand whats wrong and seek a solution.

The tutorials to load sfml are not 100% learner friendly and often involve blindly flailing around searching for the correct route. The SDL tutorials were the opposite, and most of them have a flawless step by step guide that morons like me can easily follow. This does suggest that in my 'blind flailing' at setting up SFML, I have done something wrong. Nevertheless, I have backtracked countless times but cannot pinpoint where or what that is.

   I looked again in the sfml-1.6-sdk-windows directory and found the lib files in there. Where the compiler searches for them I have no idea. Where does one find out?? Where am I supposed to move them to??

alpha bravo

  • Newbie
  • *
  • Posts: 9
    • View Profile
Error saying 'Clock has no member "getElapsedTime&qu
« Reply #13 on: September 18, 2010, 01:39:21 am »
I deleted all SFML and started again including downloading.
This failed.
Persisted and tried again.
This time no linker error but now get:

'Unable to start program. The application has failed to start because the application is incorrect. Review the manifest file for possible errors. Reinstalling the application may fix this problem.'

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Error saying 'Clock has no member "getElapsedTime&qu
« Reply #14 on: September 18, 2010, 08:17:55 am »
But there's no support for Visual C++ 2010 yet, you can't use the Visual C++ 2008 precompiled libraries, nor the Visual C++ tutorial.

SFML 2 will officially support Visual C++ 2010, and installation will be as straight-forward as with the other IDEs.

You must search the forum for explanations about how to build and install SFML with Visual C++ 2010. I think there's even a video tutorial about it.
Laurent Gomila - SFML developer