1
General / Can't compile example program with VC2010!
« on: September 15, 2010, 12:55:39 am »
Yes I saw it. Thanks again.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
#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;
}
return 0;
}
#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;
}
1>------ Build started: Project: SFML_1, Configuration: Debug Win32 ------
1>Build started 9/14/2010 4:06:57 PM.
1>InitializeBuildStatus:
1> Touching "Debug\SFML_1.unsuccessfulbuild".
1>ClCompile:
1> SFML_1.cpp
1>c:\documents and settings\teddybear\my documents\visual studio 2010\projects\sfml_1\sfml_1\sfml_1.cpp(15): error C2059: syntax error : 'return'
1>c:\documents and settings\teddybear\my documents\visual studio 2010\projects\sfml_1\sfml_1\sfml_1.cpp(16): error C2059: syntax error : '}'
1>c:\documents and settings\teddybear\my documents\visual studio 2010\projects\sfml_1\sfml_1\sfml_1.cpp(16): error C2143: syntax error : missing ';' before '}'
1>c:\documents and settings\teddybear\my documents\visual studio 2010\projects\sfml_1\sfml_1\sfml_1.cpp(16): error C2059: syntax error : '}'
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:01.40
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
1>------ Build started: Project: SFML_1, Configuration: Debug Win32 ------
1>Build started 9/14/2010 3:20:35 PM.
1>InitializeBuildStatus:
1> Touching "Debug\SFML_1.unsuccessfulbuild".
1>ClCompile:
1> All outputs are up-to-date.
1> SFML_1.cpp
1>c:\documents and settings\teddybear\my documents\visual studio 2010\projects\sfml_1\sfml_1\sfml_1.cpp(1): warning C4627: '#include <SFML/System.hpp>': skipped when looking for precompiled header use
1> Add directive to 'StdAfx.h' or rebuild precompiled header
1>c:\documents and settings\teddybear\my documents\visual studio 2010\projects\sfml_1\sfml_1\sfml_1.cpp(2): warning C4627: '#include <iostream>': skipped when looking for precompiled header use
1> Add directive to 'StdAfx.h' or rebuild precompiled header
1>c:\documents and settings\teddybear\my documents\visual studio 2010\projects\sfml_1\sfml_1\sfml_1.cpp(19): fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "StdAfx.h"' to your source?
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.29
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
#include "stdafx."
I get this build error:1>------ Build started: Project: SFML_1, Configuration: Debug Win32 ------
1>Build started 9/14/2010 3:21:30 PM.
1>InitializeBuildStatus:
1> Touching "Debug\SFML_1.unsuccessfulbuild".
1>ClCompile:
1> All outputs are up-to-date.
1> SFML_1.cpp
1>c:\documents and settings\teddybear\my documents\visual studio 2010\projects\sfml_1\sfml_1\sfml_1.cpp(1): warning C4627: '#include <SFML/System.hpp>': skipped when looking for precompiled header use
1> Add directive to 'StdAfx.h' or rebuild precompiled header
1>c:\documents and settings\teddybear\my documents\visual studio 2010\projects\sfml_1\sfml_1\sfml_1.cpp(2): warning C4627: '#include <iostream>': skipped when looking for precompiled header use
1> Add directive to 'StdAfx.h' or rebuild precompiled header
1>c:\documents and settings\teddybear\my documents\visual studio 2010\projects\sfml_1\sfml_1\sfml_1.cpp(7): error C2653: 'sf' : is not a class or namespace name
1>c:\documents and settings\teddybear\my documents\visual studio 2010\projects\sfml_1\sfml_1\sfml_1.cpp(7): error C2065: 'Clock' : undeclared identifier
1>c:\documents and settings\teddybear\my documents\visual studio 2010\projects\sfml_1\sfml_1\sfml_1.cpp(7): error C2146: syntax error : missing ';' before identifier 'Clock'
1>c:\documents and settings\teddybear\my documents\visual studio 2010\projects\sfml_1\sfml_1\sfml_1.cpp(7): error C2065: 'Clock' : undeclared identifier
1>c:\documents and settings\teddybear\my documents\visual studio 2010\projects\sfml_1\sfml_1\sfml_1.cpp(8): error C2065: 'Clock' : undeclared identifier
1>c:\documents and settings\teddybear\my documents\visual studio 2010\projects\sfml_1\sfml_1\sfml_1.cpp(8): error C2228: left of '.GetElapsedTime' must have class/struct/union
1> type is ''unknown-type''
1>c:\documents and settings\teddybear\my documents\visual studio 2010\projects\sfml_1\sfml_1\sfml_1.cpp(8): fatal error C1903: unable to recover from previous error(s); stopping compilation
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:00.31
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========