Sign in to follow this  
Fuji

SFML Beginner Issues

Recommended Posts

Fuji    205
I followed this tutorial http://www.sfml-dev.org/tutorials/1.5/start-vc.php and did everything I was told to (add .lib and include and such) yet it still returns an error. I checked everything numerous times and had a friend review it and I do not see an obvious cause. I am thinking it may be due to I have a 64 bit OS but I'm not entirely sure.

Share this post


Link to post
Share on other sites
assainator    685
In the visual C++ did you add "SFML_DYNAMIC" to the C++ preprocessors?

If you think the problem is your 64-bit OS, you should download the source and compile it yourself, and then use that.

next time, post the error to, then we know what the problem is.


assainator

Share this post


Link to post
Share on other sites
Fuji    205
Yes, I did. Here is the error I am getting:

1>c:\users\casey\documents\visual studio 2008\projects\clock\clock\clock.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:\users\casey\documents\visual studio 2008\projects\clock\clock\clock.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:\users\casey\documents\visual studio 2008\projects\clock\clock\clock.cpp(15) : fatal error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "stdafx.h"' to your source?
1>Build log was saved at "file://c:\Users\Casey\Documents\Visual Studio 2008\Projects\clock\clock\Debug\BuildLog.htm"
1>clock - 1 error(s), 2 warning(s)

Share this post


Link to post
Share on other sites
mattd    1078
It looks like you're not intending to use precompiled headers (no real need to for a simple tutorial), but have them enabled inadvertently.

Turn off precompiled headers in your project's options: C/C++ -> Precompiled Headers -> Create/Use Precompiled Header: Not Using Precompiled Headers

Share this post


Link to post
Share on other sites
mattd    1078
You'll generally know when you want to use precompiled headers, namely if you have big, included-everywhere headers. So if you do, sure, turn them back on later - but after you've read some documentation on how to use them!

Otherwise, they are fine left turned off. They do not affect how your code runs, instead they are used to help decrease compilation times.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this