5
« on: April 17, 2014, 05:12:13 am »
I've went through the 1st tutorial on how to include the SFML libs into VS, however when I try their test program from the 1st tutorial I'm coming across errors.
" error C2678: binary '<' : no operator found which takes a left-hand operand of type 'sf::Time' (or there is no acceptable conversion) "
or from the tooltip on the hover-over it states that " Error: no operator "<<" matches these operands. operand types are std::ostream << sf::Time"
Also I had to change the while (Clock.GetElapsedTime () < 5.f)
to while (Clock.getElapsedTime () < 5.f)
lower case g. same case with sf::Sleep (0.5f);
to sf::sleep (0.5f);
Below is the copy paste of the compiler messages:
1>------ Build started: Project: SFMLTutorials, Configuration: Debug Win32 ------
1> Tutorial1.cpp
1>f:\c++ projects\sfml tutorials\sfmltutorials\sfmltutorials\tutorial1.cpp(7): error C2678: binary '<' : no operator found which takes a left-hand operand of type 'sf::Time' (or there is no acceptable conversion)
1> f:\microsoft visual studio 12.0\vc\include\sfml\system\time.hpp(185): could be 'bool sf::operator <(sf::Time,sf::Time)' [found using argument-dependent lookup]
1> f:\microsoft visual studio 12.0\vc\include\sfml\system\string.hpp(398): or 'bool sf::operator <(const sf::String &,const sf::String &)' [found using argument-dependent lookup]
1> while trying to match the argument list '(sf::Time, float)'
1>f:\c++ projects\sfml tutorials\sfmltutorials\sfmltutorials\tutorial1.cpp(7): fatal error C1903: unable to recover from previous error(s); stopping compilation
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
EDIT: changed to use the [code]
thanks didii.
Help? Thanks in advance.