• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Saint Squireen

CodeBlocks and SFML Confusion?

7 posts in this topic

Hello,

 

    My problem is that I have been trying to link SFML with codeblocks and I can never seem to be able to do it. The first time I have ever tried this was probably a year ago, when I was first learning C++.

 

I tried and I couldn't do it.

 

I decided that maybe I was too new in the programming world anyways to try this SFML thing out. So I waited a bit and tried again. Didn't work. Couldn't make sense of what I was doing, didn't know if it was working....

 

Again I waited,

 

and again I failed.

 

So now I'm thinking, "There has got to be an easier way of doing this..." I come up with the idea that maybe somebody has made a video tutorial on how to link up SFML and codeblocks. So I go and search, find nothing, but still the idea that if somebody had made a video tutorial, the how in the world could I mess up linking and compiling it together?

 

That's when I came here. Before you go ahead and tell me I'm such a dumbass, that SFML is one of the easiest ones to work with, understand that I am young and don't have any clue on what I was doing when I was trying to work with SFML.

 

******************************************************************************************************

Now the real qestion: Does anybody know where a guy can find a video tutorial on how to put codeblocks and SFML together? Can someone take time out of their day and make one perhaps?

******************************************************************************************************

 

Anything to help would be appreciated and any questions regarding anything, just ask below.

1

Share this post


Link to post
Share on other sites

Have you looked at the tutorial provided at the SFML site? Click here for site.

 

Also, I put together some images for setting up projects to use SFML, maybe it will help.  Click here for them.

 

If so, what are you having trouble with?

1

Share this post


Link to post
Share on other sites

Yeah, I've tried the websites tutorial and that's what I've been having a hard time on.

 

Also I looked at your pictures, and I did all that they said (except for the ones that had the extra stuff like the physics engine) and I built and ran it and it gave me...

 

 

mingw32-g++.exe: lsfml-window: No such file or directory
mingw32-g++.exe: lsfml-network: No such file or directory
mingw32-g++.exe: lsfml-audio: No such file or directory
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
 

0

Share this post


Link to post
Share on other sites

CodingMadeEasy has a number of SFML tutorials on YouTube. His seem to be the most comprehensive. I also typed "SFML Tutorial" into the search box at YouTube and came back with a number of hits from different users, but I recommend you go with the CodingMadeEasy series.

 

Being able to configure a development environment is a very essential skill in programming. As you work your way through that first video, I recommend that you take the time to fully understand why you have to configure each option the way you do. One way to do that is to read a book about GCC (since you are using MinGW, the Windows port of the compiler). You can read an introductory text online for free. If you work through that book and learn how to use the compiler from the command line, then the IDE options will make a whole lot more sense to you and you'll be able to more easily solve configuration problems in the future.

1

Share this post


Link to post
Share on other sites
<br />A library is just a collection of pre-written code that someone else wrote to achieve a certain task. You can't really install them into anything. You just put them in a folder somewhere.<br /><br />When you compile an executable using a library, the compiler needs to know where to find the header files you included, and then the linker needs to know where to find any libraries you will be linking to.<br /><br />There are different ways to do this. You might type them right in on the command line when you call your compiler and linker. Or you might include the folders in the PATH environment variable for your OS.<br /><br />In an IDE, there are settings to include these paths. Both globally, and on a per project basis. In Code Blocks you will see a setting page for includes, add the folder for the SFML includes to it. You will also see another settings page for the folders to find libraries to link to. Add the folder that SMFL has with the libraries to there.<br /><br />You will also need to tell CodeBlocks what libraries you are using so it can properly add them to the command line when calling the compiler and linker for you.
0

Share this post


Link to post
Share on other sites

I also had alot of trouble getting SFML running the first time. what i had to do was rebuild SFML using a program called Cmake. It fixed everything and it works fine now. if you mean that you had trouble understanding how it works, and not trouble getting it running, i suggest reading the tutorials on the SFML website.

0

Share this post


Link to post
Share on other sites

Saint, its possible that you are getting a combination of problems that are escalating into a massive headache.

The problem you've posted has less to do with SFML, and more to do with understanding how C++ (and, my guess in your case since its C::B) and MinGW( aka gcc) works. 

You'll want to get some more experience with C++, maybe getting more comfortable with how linking works (both static and dynamic), along with what needs to be set in the IDE for things to compile. Also, if you're running in windows, dynamic libraries and how they work in windows is worth understanding.

 

This is going to be a bit of a divergence from your original post, but I think it strikes more to the heart of what you want to do:

what is your goal? Is there some reason you are attached to SFML? or even C++? 

 

If your goal is to get more comfortable with graphics programming, then it might be worth trying to go with C# or even Java, since its "easier" to understand. Heck, you can even use Python if you want to-- the fundamentals of graphics programming isn't going to change with the language you choose.

 

If you really want to use C++, then your first goal should be to get used to C++, IDEs and how C++ links / builds / executes. 

Try doing something that uses a 3rd party library and has nothing to do with graphics at all. For instance: Build, link and use one of the libraries available through Boost. 

 

Also, did you check this page out?

https://github.com/LaurentGomila/SFML/wiki/FAQ#wiki-grl-whatis 

scroll down to where it says Code::Blocks. there are some tips as to what you can do to make it work.

If you are having trouble understanding what that page is talking about, then you need to step back and get more experience with C++ / C::B first.

Edited by IkarusDowned
0

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  
Followers 0