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

Author Topic: Setup issues  (Read 3776 times)

0 Members and 1 Guest are viewing this topic.

sirchick

  • Newbie
  • *
  • Posts: 13
    • View Profile
Setup issues
« 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..

Tex Killer

  • Full Member
  • ***
  • Posts: 242
    • View Profile
Setup issues
« Reply #1 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.

sirchick

  • Newbie
  • *
  • Posts: 13
    • View Profile
Setup issues
« Reply #2 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

Tex Killer

  • Full Member
  • ***
  • Posts: 242
    • View Profile
Setup issues
« Reply #3 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.

Contadotempo

  • Full Member
  • ***
  • Posts: 167
  • Firelink Shrine
    • View Profile
Setup issues
« Reply #4 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).

Jove

  • Full Member
  • ***
  • Posts: 114
    • View Profile
    • http://www.jestofevekites.com/
Setup issues
« Reply #5 on: March 05, 2012, 07:50:54 pm »
Try this for compiling 1.6 for VS2010.

{much better code}

coolhome

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
Setup issues
« Reply #6 on: March 12, 2012, 03:36:53 am »
Quote from: "Jove"
Try this for compiling 1.6 for VS2010.



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.
CoderZilla - Everything Programming