SFML community forums

Help => System => Topic started by: alpha bravo on September 15, 2010, 01:34:23 pm

Title: Error saying 'Clock has no member "getElapsedTime&qu
Post by: alpha bravo 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.
Title: Error saying 'Clock has no member "getElapsedTime&qu
Post by: Laurent on September 15, 2010, 02:01:16 pm
It's GetElapsedTime, not getElapsedTime.
Title: Error saying 'Clock has no member "getElapsedTime&qu
Post by: alpha bravo 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'
Title: Error saying 'Clock has no member "getElapsedTime&qu
Post by: panithadrum 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
Title: Error saying 'Clock has no member "getElapsedTime&qu
Post by: alpha bravo 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'
Title: Error saying 'Clock has no member "getElapsedTime&qu
Post by: alpha bravo 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'
Title: Error saying 'Clock has no member "getElapsedTime&qu
Post by: Nexus 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.
Title: Error saying 'Clock has no member "getElapsedTime&qu
Post by: alpha bravo 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.
Title: Error saying 'Clock has no member "getElapsedTime&qu
Post by: panithadrum 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).
Title: Error saying 'Clock has no member "getElapsedTime&qu
Post by: alpha bravo 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.
Title: Error saying 'Clock has no member "getElapsedTime&qu
Post by: Laurent 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.
Title: Error saying 'Clock has no member "getElapsedTime&qu
Post by: panithadrum 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!
Title: Error saying 'Clock has no member "getElapsedTime&qu
Post by: alpha bravo 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??
Title: Error saying 'Clock has no member "getElapsedTime&qu
Post by: alpha bravo 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.'
Title: Error saying 'Clock has no member "getElapsedTime&qu
Post by: Laurent 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.
Title: Error saying 'Clock has no member "getElapsedTime&qu
Post by: alpha bravo on September 19, 2010, 02:38:41 am
No worries Ill wait for v2.

I followed the utube tutorial and got same result.

As to searching the forum for explanations about how to build and install SFML with Visual C++ 2010, it becomes very messy trying to put it all together from snippets of information here and there. I tried that also and for a beginner nothing could be more confusing.

Thanks all the same.