SFML community forums

Help => General => Topic started by: sirchick on March 04, 2012, 10:10:42 pm

Title: Setup issues
Post by: sirchick on March 04, 2012, 10:10:42 pm
Hey

I followed the tutorial to set up my project but its not working =/

I use Visual Studio C++ 2010 Express.

I used the demonstrated code in the tutorial but i get a few errors which is as follows:

Code: [Select]

main.cpp(1): warning C4627: '#include <SFML/System.hpp>': skipped when looking for precompiled header use
Add directive to 'StdAfx.h' or rebuild precompiled header

main.cpp(2): warning C4627: '#include <iostream>': skipped when looking for precompiled header use
Add directive to 'StdAfx.h' or rebuild precompiled header

main.cpp(13): fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "StdAfx.h"' to your source


I'm assuming i messed up the setup of the project but i can't work out what i got wrong, the tutorial doesn't quite follow the way 2010 works, as they made changes in 2010 so i'm wondering if some one knows what my mistake is..
Title: Setup issues
Post by: Tex Killer on March 05, 2012, 04:49:46 am
Have you recompiled SFML?
The available binaries do not work with Visual Studio 2010, so you have to recompile SFML from source.

There are also user-compiled VS 2010 binaries through the forum, so you can search for that.
Title: Setup issues
Post by: sirchick on March 05, 2012, 05:00:41 am
I wouldn't know how to do that :P Still kinda new to using this application and a SDK
Title: Setup issues
Post by: Tex Killer on March 05, 2012, 05:16:32 am
If you want to use SFML 2, there is a tutorial on the SFML2 tutorials section of the site.

If you want to use SFML 1.6, search the forum for a way of compiling it, or for pre-compiled binaries.
Title: Setup issues
Post by: Contadotempo on March 05, 2012, 05:22:13 pm
The error should be self-explanatory. You seem to be creating a project that uses the precompiled header stdafx.h but then you're not using it.

Try creating an empty project that doesn't use a precompiled header and it should work, assuming SFML is set up correctly (you will have to recompile it for VS2010).
Title: Setup issues
Post by: Jove on March 05, 2012, 07:50:54 pm
Try this for compiling 1.6 for VS2010.

http://www.youtube.com/watch?v=-uHGZGgMETg
Title: Setup issues
Post by: coolhome on March 12, 2012, 03:36:53 am
Quote from: "Jove"
Try this for compiling 1.6 for VS2010.

http://www.youtube.com/watch?v=-uHGZGgMETg


Here is my compiled binaries for 1.6
http://coderzilla.com/libraries/SFML-1/binaries/1.6-MSVC10/SFML-1.6.zip

Hopes this saves you some time, but you really should learn how to compile other libraries.