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

Author Topic: Quick SFML Project setup for YOUR project!  (Read 5738 times)

0 Members and 1 Guest are viewing this topic.

GatorQue

  • Newbie
  • *
  • Posts: 36
    • View Profile
Quick SFML Project setup for YOUR project!
« on: July 12, 2011, 07:07:20 am »
All,

Many people have trouble getting started with SFML due to Linker problems and compiler issues.  I have taken my GQE setup and turned it into a generic SFML project file for those of you who want to get started with SFML for your OWN projects but don't want to figure out all the CMake scripts to get it all to Compile/Link properly.  This basic SFML 2.0 or SFML 1.6 project ZIP file can be downloaded from the GQE Project website.

In other words, using SFML just got easier:
1. Make sure CMake is installed on your machine
2. Download SFML2-0_Proj.zip or SFML1-6_Proj.zip from GQE Project page
3. Unzip to directory of your choice
4. [Optional] Replace the Pong.cpp file under src with your own SFML project files
5. [Optional] Replace the resource files under resources with your own resources files
6. [Optional] Customize the CMakeFiles.txt file(s) for your project name
7. From the Visual Studio Command Prompt, Dos Prompt, or Linux terminal type the following:
  cd build
  cmake ..   (will pick the default build solution for your system)
  make, nmake or open solution file in your IDE
8. Type MyProject to execute your project

Advantages:
  - This allows you to add SFML dependent project code quickly and painlessly.
  - This project copies your resources directory to your build directory for easy testing/debugging.
  - This is not tied to anything except SFML, but can be easily extended to add other dependencies for your project.

Haikarainen

  • Guest
Re: Quick SFML Project setup for YOUR project!
« Reply #1 on: July 12, 2011, 09:54:13 am »
Nice thing for beginners to learn with, but i think the whole idea might dumben down newbs even more. It isn't really that hard to get it up and running as soon as you understand linkage, inclusion, etc. A guide on how to get it up and running would be better but there still is guides for this.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Quick SFML Project setup for YOUR project!
« Reply #2 on: July 12, 2011, 10:08:18 am »
I agree with Haikarainen. What beginners need is to understand the basics of projects/compiling/linking, rather than blindly following simple guidelines. Too many people want to use SFML but don't even know what compiling, linking, DLLs or libraries are and how they work -- which in my opinion is mandatory before writing programs more complicated than a hello world.
Laurent Gomila - SFML developer

GatorQue

  • Newbie
  • *
  • Posts: 36
    • View Profile
Quick SFML Project setup for YOUR project!
« Reply #3 on: July 12, 2011, 02:04:43 pm »
While I agree with both of you in principle, sometimes its nice to be able to see an example of what works so you can learn from it.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Quick SFML Project setup for YOUR project!
« Reply #4 on: July 12, 2011, 02:13:42 pm »
Yes, providing an example is very helpful for beginners. But it must remain an example, not a "copy-and-paste" thing ;)
Laurent Gomila - SFML developer

teto

  • Newbie
  • *
  • Posts: 35
    • View Profile
Quick SFML Project setup for YOUR project!
« Reply #5 on: August 12, 2011, 10:29:16 am »
Quote from: "Laurent"
I agree with Haikarainen. What beginners need is to understand the basics of projects/compiling/linking, rather than blindly following simple guidelines. Too many people want to use SFML but don't even know what compiling, linking, DLLs or libraries are and how they work -- which in my opinion is mandatory before writing programs more complicated than a hello world.

In which case they should learn with a smaller lib. Btw you might know how it works but don't want to spend time into IDE-specific details in order to configure things. This project is interesting thx
See you net cow-boy ...

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Quick SFML Project setup for YOUR project!
« Reply #6 on: August 12, 2011, 10:48:54 am »
Quote from: "teto"
In which case they should learn with a smaller lib.
Why exactly is SFML so much more complicated than a smaller lib? You have to know how to build, link, include anyway.

Quote from: "teto"
Btw you might know how it works but don't want to spend time into IDE-specific details in order to configure things.
You must spend time for IDE-specific details if you work with a IDE, even if only for the most basic steps about linking and including. I don't know though how this is related to SFML...
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

sbroadfoot90

  • Jr. Member
  • **
  • Posts: 77
    • View Profile
Quick SFML Project setup for YOUR project!
« Reply #7 on: October 16, 2011, 12:10:21 am »
Quote from: "Nexus"

Quote from: "teto"
Btw you might know how it works but don't want to spend time into IDE-specific details in order to configure things.
You must spend time for IDE-specific details if you work with a IDE, even if only for the most basic steps about linking and including. I don't know though how this is related to SFML...


Agreed, you can use SFML without an IDE. IDE-specific details are what you need to learn if you want to use that IDE.

 

anything