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

Author Topic: SFML installing on Visual Studio 2010 Professional  (Read 22820 times)

0 Members and 1 Guest are viewing this topic.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11008
    • View Profile
    • development blog
    • Email
Re: SFML installing on Visual Studio 2010 Professional
« Reply #15 on: October 09, 2012, 10:57:22 am »
Hmmm I'm not sure, but I've never used space, but always used semicolons, then again I've only worked with VS10 & VS12...
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

ekeimaja

  • Guest
Re: SFML installing on Visual Studio 2010 Professional
« Reply #16 on: October 09, 2012, 11:23:25 am »
Now I replaced spaces with semicolon, and that error disappeared (at last). But now there came new error...

error C1010: unexpected end of file while looking for precompiled header. Did you forget to add '#include "StdAfx.h"' to your source?

If I add more includes,
#include
  comes red underlined.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11008
    • View Profile
    • development blog
    • Email
Re: SFML installing on Visual Studio 2010 Professional
« Reply #17 on: October 09, 2012, 11:30:13 am »
You should always start off with an empty project (not console nor window).
There's an optino somewhere in the project settings to deactivae precompiled headers.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: SFML installing on Visual Studio 2010 Professional
« Reply #18 on: October 09, 2012, 11:37:20 am »
Precompiled header options are in "C/C++ > Precompiled headers". Don't use them if you don't know how they work ;)
Laurent Gomila - SFML developer

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: SFML installing on Visual Studio 2010 Professional
« Reply #19 on: October 09, 2012, 01:06:15 pm »
If you follow the tutorial step by step you get a working project. Trust me. And in case I'm wrong, then it will help others a lot more if you help me understand what's missing or incorrect in the tutorial, rather than throwing them an empty SFML project.

Do you link to the dynamic or static version of SFML? Are your defines set accordingly?
« Last Edit: October 09, 2012, 01:09:07 pm by Laurent »
Laurent Gomila - SFML developer

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11008
    • View Profile
    • development blog
    • Email
Re: SFML installing on Visual Studio 2010 Professional
« Reply #20 on: October 09, 2012, 01:12:54 pm »
I say this again... Please someone create for me empty, ready for use Solution file with ready SFML-settings. It will ease my and others work very much.
If you don't learn how to do this sort of thing, then you'll have a hard time programming in C++.

The error means that you're either mixing debug and release versions or that you mix static and dynamic library versions. Both 'sides' have to align with each other.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

ekeimaja

  • Guest
Re: SFML installing on Visual Studio 2010 Professional
« Reply #21 on: October 09, 2012, 01:30:13 pm »
Now I tried 2 times with SFML 2.0 tutorial. Did not work. Of course I can try 1.6 tutorial again. Or can someone record video when making SFML project from scratch? That would help also to see which parts I have maybe failed.
« Last Edit: October 09, 2012, 01:36:27 pm by ekeimaja »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: SFML installing on Visual Studio 2010 Professional
« Reply #22 on: October 09, 2012, 01:35:32 pm »
Quote
Did not worked
You're not helping us to solve your problem.

Please:
- post the error messages
- answer our questions

Or upload your .vcproj file, it will probably be faster than guessing what you might have done wrong, and asking you to tell us what parameters you used etc. ;)
« Last Edit: October 09, 2012, 01:37:14 pm by Laurent »
Laurent Gomila - SFML developer

ekeimaja

  • Guest
Re: SFML installing on Visual Studio 2010 Professional
« Reply #23 on: October 09, 2012, 01:42:36 pm »
I will try from beginning with 2.0 and by recording it now. Then we can see is tutorial wrong or do I just fail something.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: SFML installing on Visual Studio 2010 Professional
« Reply #24 on: October 09, 2012, 01:50:12 pm »
No offense, but if you ignore what we are saying or asking, chances are we won't reply anymore.

I'm at work so I can't watch a video. But I can look at a .vcproj file.
Laurent Gomila - SFML developer

ekeimaja

  • Guest
Re: SFML installing on Visual Studio 2010 Professional
« Reply #25 on: October 09, 2012, 03:12:50 pm »
Now is made again, followed by 2.0 tutorial. Here is the full project zipped.

http://www.speedyshare.com/YtRuG/download/sfml.zip
« Last Edit: October 09, 2012, 03:16:23 pm by ekeimaja »

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: SFML installing on Visual Studio 2010 Professional
« Reply #26 on: October 09, 2012, 03:38:05 pm »
You define SFML_STATIC, but you link to the dynamic libraries (the static ones have the "-s" suffix"). This is clearly explained in the tutorial, isn't it?

Quote from: The tutorial
Static SFML libraries have the "-s" suffix: "sfml-xxx-s-d.lib" for Debug, and "sfml-xxx-s.lib" for Release.
In this case, you'll also need to define the SFML_STATIC macro in the preprocessor options of your project.

And by the way, this is what I asked you 7 posts ago ::)
Laurent Gomila - SFML developer

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: SFML installing on Visual Studio 2010 Professional
« Reply #27 on: October 09, 2012, 03:57:01 pm »
Quote from: The tutorial
don't forget to copy the SFML DLLs (they are in <sfml-install-path/bin>) to the directory where your compiled executable is

I told you, everything is explained. Just read carefully.

Quote
Well, took SFML_STATIC off and -d from linker input things
-d is for debug libraries. You must keep it in your Debug configuration.
Laurent Gomila - SFML developer

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
Re: SFML installing on Visual Studio 2010 Professional
« Reply #28 on: October 09, 2012, 04:04:13 pm »
This is not really an excuse... but yes, the next version of the website will use a bigger font size and have important paragraphs in red.
Laurent Gomila - SFML developer

ekeimaja

  • Guest
Re: SFML installing on Visual Studio 2010 Professional
« Reply #29 on: October 09, 2012, 04:11:03 pm »
Now works when run, but title doesn't

btw. can one library be so hard as this? Only problems after problems.