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

Author Topic: Request: Help newbies using SFML without having to care about compilation  (Read 11245 times)

0 Members and 1 Guest are viewing this topic.

namosca

  • Newbie
  • *
  • Posts: 7
    • View Profile
Hello all!! I remember being new to C++ and wanting to get SFML for my system for the first time. I arrived at the download section of the website, only to see that no precompiled version of SFML was available for my specific GCC version. I eventually found out how to do this by myself, but this process is quite a headache for beginners. It can scary people out quite quickly if not enough tutorials are available.

SFML tutorial on how to compile got me strong on my hope that the process would eventually work, but I wished it could be even easier at the time. If we eliminate this entry barrier, I bet we can get even more people using this library.

As SFML seems to be interested in attracting people for its ease of use, I think I can help SFML by providing you this suggestion:

I have found something which can ease this for the beginner. It is basically choosing a compiler which can download the latest SFML version by itself without requiring that the user cares about how to compile SFML. And if the user updates his compiler, his SFML will get updated automatically without headaches.

I though we could advertise this on the download section of SFML (http://www.sfml-dev.org/download/sfml/2.3.2/) or on the "Getting Started" tutorials on http://www.sfml-dev.org/tutorials/2.3/

Basically its installing the MSYS2 compiler system and using its package manager (pacman) to download SFML from it.

The user just has to open the package manager (pacman), search for SFML inside it and ask to install it.

See details for the package manager here: http://sourceforge.net/p/msys2/wiki/MSYS2%20installation/
And an old example of installing the SFML from this package manager here: https://github.com/Alexpux/MSYS2-packages/issues/10

The information is not too complete now, but I bet we can organise it in a way to make it very clear and useful to every beginner.

Thanks!

EDIT: If you from SFML have no time for this, I could try writing the tutorial myself, and you from SFML administration could make the aesthetics of it such as to fit your website or making final changes when needed.

« Last Edit: November 22, 2015, 10:34:05 am by namosca »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Request: Help newbies using SFML without having to care about compilation
« Reply #1 on: November 22, 2015, 12:35:56 pm »
This doesn't solve anything. All it does is again "force" people to use one specific compiler. But on top of that they then would also have to use the whole MSYS and will rely on the package maintainer to update it for every new version.

So if you are willing to use a different compiler, that the one you use but there's no pre-compiled binaries for, then you can as well grab a compiler that we do provide pre-built binaries for.
If you already do use MSYS and its compiler you can of course use the package manager, but that's a very specific case.

Last but not least we're trying to provide a well documented and simple API that will make it easy for everyone to use it, our goal is not to get as many beginners in as possible. If you (seriously) want to develop in C++ you have to learn sooner than later how to built, link and work with libraries. Plus as a programmer you should be able to follow simple tutorials/guides step by step.
If people struggle with this it's (in most cases) not because of SFML but instead it shows that these people should first spend more time acquiring basic (C++) developer skills. SFML and our community is not here to teach you programming from zero.

What we may think about is adding a note that people using MSYS (or Cygwin) could potentially use the built-in package managers. ;)
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

paupav

  • Full Member
  • ***
  • Posts: 156
    • View Profile
    • Email
Re: Request: Help newbies using SFML without having to care about compilation
« Reply #2 on: November 23, 2015, 07:41:02 pm »
There should be big sign that says "Install Ubuntu/Fedora and use "this" command/s to install SFML, codeblocks and gcc. "

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: Request: Help newbies using SFML without having to care about compilation
« Reply #3 on: November 23, 2015, 08:24:09 pm »
Why?

SFML works just fine with other distributions (I've used it on CentOS, Arch Linux, Slackware and Debian with no issues). It also works fine with clang, so telling users to use GCC (while a fine compiler) is also somewhat misguided (they can use a multitude of compilers).

SFML is quite distribution and compiler agnostic.
« Last Edit: November 23, 2015, 08:59:13 pm by Jesper Juhl »

Satus

  • Guest
Re: Request: Help newbies using SFML without having to care about compilation
« Reply #4 on: November 23, 2015, 10:53:02 pm »
If you are using Clion, you can build SFML in one click and then copy-paste code from tutorial for cmake in your project CMakeLists, and it works.

paupav

  • Full Member
  • ***
  • Posts: 156
    • View Profile
    • Email
Re: Request: Help newbies using SFML without having to care about compilation
« Reply #5 on: November 23, 2015, 11:29:03 pm »
Because GCC is most widely used compiler.
Death to all compilers besides GCC!

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11030
    • View Profile
    • development blog
    • Email
Request: Help newbies using SFML without having to care about compilation
« Reply #6 on: November 24, 2015, 01:29:55 am »
If you don't have anything useful to contribute, please don't post, we don't need trolls.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

namosca

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Request: Help newbies using SFML without having to care about compilation
« Reply #7 on: November 24, 2015, 10:35:24 am »
Hi eXpl0it3r

I think this is really important, because at least in my case I was between learning C++ and Java, and in Java is really easy to get this multimedia things running, and on C++ you have to fight a lot to get it running (if you are a beginner). The only reason I kept with C++ was because SFML was lowering my headache on this topic.

So you see... A beginner is usually confused about one Million things, and adding a tiny bity of  complexity to it (even if it is to compile a library) is already enough to overload People new to any topic.

I know you don’t agree on trying to reach a bigger audience, but I think its really a beautiful Thing to be able to massify contents which are usually for a selected Group of people. Some hundreds of years ago, being able to read or write was a privilege of only a few, and now this is massified knowledge. The same is for computers and so many other things in our everyday life.

This philosophy apart, although I would still think the tutorial would be nice, I accept your suggestion of leaving a note on the site for people who are confused with so many Options, as you said:

"What we may think about is adding a note that people using MSYS (or Cygwin) could potentially use the built-in package managers. ;)"

I believe that adding the note as you said would be probably good enough (provided the note is in someplace easy to be found).

We could write something like this: "If you are lost with so much compiler possibilities or compilation problems, just use the MSYS2 system with a package manager (available on link bla bla) and let the package manager work the details for you."


Near the note we could leave the link to get MSYS2 (for Windows or any other widely used platforms) for people who are still lost with he possibility of using one Million Compilers, each one with their dependancy problems.


Or even better, we could provide a "it works out of the box pack" which comes with Codeblocks, a compiler and the latest SFML already installed and running out of the box that requires no headache with compilation or choosing a compiler and IDE for the user.

I think providing it for at least Windows should be enough to get the majority of people.

« Last Edit: November 24, 2015, 10:57:51 am by namosca »

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Request: Help newbies using SFML without having to care about compilation
« Reply #8 on: November 24, 2015, 03:14:49 pm »
Because GCC is most widely used compiler.
And Windows is the most widely used OS, 'American' English is the most widely used language and SDL is the most widely used 2D graphics library, but it doesn't mean that the most popular is the best choice. Everyone should be entitled to use any setup or software that they prefer without being dictated to by one's elitist preference.

Some assumptions have been made in my post, similarly to the way the assumptions were made in the quoted post.
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

namosca

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Request: Help newbies using SFML without having to care about compilation
« Reply #9 on: November 26, 2015, 10:15:25 am »
Everyone should be entitled to use any setup or software that they prefer without being dictated to by one's elitist preference.

Maybe I didn’t express myself clearly, so that’s why you missed the point.

The point is to aid people who are lost with too much options (beginners). Beginners need guidance and strong directions, otherwise they get lost, frustrated, and abandon your tool. Too much freedom or alternative at this point is totally detrimental to getting something useful for beginners.

That is why I say that my idea is useful for BEGINNERS. For people who are already into the workflow of software development, then I agree with you.

Hapax

  • Hero Member
  • *****
  • Posts: 3379
  • My number of posts is shown in hexadecimal.
    • View Profile
    • Links
Re: Request: Help newbies using SFML without having to care about compilation
« Reply #10 on: November 27, 2015, 02:37:12 am »
that’s why you missed the point.
I think you misunderstood who I was replying to.
Selba Ward -SFML drawables
Cheese Map -Drawable Layered Tile Map
Kairos -Timing Library
Grambol
 *Hapaxia Links*

Mario

  • SFML Team
  • Hero Member
  • *****
  • Posts: 879
    • View Profile
Re: Request: Help newbies using SFML without having to care about compilation
« Reply #11 on: November 27, 2015, 04:13:07 pm »
I have found something which can ease this for the beginner. It is basically choosing a compiler which can download the latest SFML version by itself without requiring that the user cares about how to compile SFML. And if the user updates his compiler, his SFML will get updated automatically without headaches.

That's essentially true for most Linux distributions. However, you must never forget the fact that such precompiled packages are always only as up-to-date as the maintainer updated them. So worst case you'll only get some older version with some specific bugs not being fixed.

In addition to that, on Windows it's generally more complicated to use any package manager, because there's no standardized one (like apt-get). Besides that, if you're into programming, you'll have to learn how to use libraries sooner or later, so I wouldn't consider that a massive hurdle, especially considering how easy CMake is to use.

Downloading, building, and installing SFML could essentially be done in one line:

git clone https://github.com/SFML/SFML.git SFML && cd SFML && cmake --build --target install .

Of course this gets more complicated depending on which compiler you'd like to use etc. but let's be honest here: The time it takes to explain some package manager bundled with a specific compiler, you could also explain compiling from scratch with the user's own favorite toolchain.

Forcing users into using some specific toolset, just to make it "easier" for them, isn't the way to go. In fact I'm pretty sure this would often have the opposite effect. I don't remember how many libraries I've turned away, just because I would have been forced to use MSYS (or Cygwin) to build (because my preferred environment is Visual Studio).

If that's not what you've had in mind, then you might have to explain yourself a bit better or possibly even write a mockup somewhere to explain how the download page should look like in your opinion.

namosca

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Request: Help newbies using SFML without having to care about compilation
« Reply #12 on: November 27, 2015, 05:26:52 pm »
Hey Mario,

It seems to me that exploiter got the point already and he is one of the people able to fix it if he is wants to.

I believe that any further attempt at explaining myself again will generate always the same type of comments like „freedom is more important to the beginner than actually getting something working out of the box”.

Thus, I will not explain this yet one more time.



But thanks anyway for the chance :)