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

Author Topic: Setting SFML properties on VS2010 with 1 click!  (Read 2629 times)

0 Members and 1 Guest are viewing this topic.

TheEnigmist

  • Full Member
  • ***
  • Posts: 119
    • View Profile
Setting SFML properties on VS2010 with 1 click!
« on: January 17, 2012, 12:23:58 am »
Hi all,
sorry for my bad english :lol:.
I want to share with all this guide for setting SFML proprieties for all new VS2010 projects. Hope it helps some ppl, if not Leaurent can destroy this thread :lol:
PS: Yes, i used paint to take pics :lol:
(I used to be photoshop user, then i took a ban in the program).

Let's start!
Open a new project in VS2010 (Console application in this example).
Go to View->Property Manager
1
Right click on your project -> Add New Project Property Sheet...
2
Choose a Name and Location where you want store this personal setup.
SFML and Desktop in my example.
3
Click Add and you should have something like this:
4
Now right click on one of 2 SFML -> Properties
5
You should see SFML Property Page!
Go to VC++ Directories and select Include Directories, then click on the right -> Edit, we are adding our SFML includes:
6
Now in Include Directories double click on empty space and you shoud see something like this:
7
Click on suspension points and find your SFML's include folder, Program Files (x86)\SFML\include in my example.
8
Add that folder and then click OK
9
Repeat this step for Library Directories to add SFML's lib folder
10
You should have something like this after these steps:
11
Now go to C/C++ section and in General->Additional Include Directories do the same as Include Directories of VC++ Directories section:
12
Go in Preprocessor and add in Preprocessor Definitions SFML_DYNAMIC or SFML_STATIC, i choose SFML_DYNAMIC in this example:
13
Now go in Linker section -> Input and add in Additional Dependecies all libs like in picture:
14
If you want, you can personalize your setting. In this example i added this string in Pre-Build Event so when i build my project it will copy all .dll in the outdir folder.
15
Now if all is went well we can build with success a stupid SFML program like this:
16
As you can see, it copies all dll in my out dir!
Now let's test this setup for a new project.
Start a new project and try to include a SFML .hpp. You cannot do it of course:
17
We have to use our personal property sheet.
Let's add it. Go to Property Manager, right click on your proyect -> Add Ecisting Property Sheet...
18
Search your .props file and open it:
19
You should see your sheet in Property Manager as this:
20
Let's write the stupid SFML program:
21
22
Build succeeded! Yeah.
thx for reading :D

 

anything