under installing SFML is says "Once you have downloaded and extracted the files to your hard drive, you must install the SFML headers and library files to the appropriate location. To do so, you just have to go to the SFML-x.y directory and type "sudo make install".
id dont know what it means by going to the SFML-x.y directory?
Whenever possible, you should use the package manager to install libraries. Only build them yourself if there's no recent enough version in the repos or if you intend to modify them.
In Debian/Ubuntu/Mint, the package name of the SFML development kit is libsfml-dev.
id dont know what it means by going to the SFML-x.y directory?
You change the current directory with the command cd (in a terminal).
ok so i went to package manager and searched and installed libsfml-dev, what did i just do??? installed sfml headers or what? what exactly is the developmental kit?
and how would i get the libraries available in Code::Blocks
When you install the development variant of a library (those that end in -dev), the following is generally installed:
1. the library itself (i.e. the shared libraries).
2. the header files.
3. the static variants of the libraries (if any).
In the package manager, you can also right-click an already installed package and check which files were installed under Properties/Installed files.
and how would i get the libraries available in Code::Blocks
You just need to link the libraries you need (e.g. sfml-graphics and sfml-window), by adding them to "Link libraries" in Project/Build options/Linker settings.
that was the first time i ever even went into package manager, im use to going in software manager
im going into unfamiliar territory (without the console) including these files, that file, and such, im just use to using the standard.
wouldn't I want to link all the libraries that i just downloaded?
when i go into code blocks > linker settings and click add under link libraries: it gives a little window to go to the file ... i then go to usr/include/SFML and click on the (windows) for example, and it only gives me the option to open it (if i do i just get an empty looking file) and at that point i am stuck and unsure of what to do?
when i go there not via code blocks i can see all the .hpp files in Window though ???
when i go into code blocks > linker settings and click add under link libraries: it gives a little window to go to the file ... i then go to usr/include/SFML and click on the (windows) for example, and it only gives me the option to open it (if i do i just get an empty looking file) and at that point i am stuck and unsure of what to do?
No, not like that. Just type e.g. sfml-graphics into the "Add library" text field (separate them with a semicolon if you want to add several libraries).
/usr/include only contains header files anyway. You don't need to link against those (nor is such a thing possible), only the libraries.
#include <SFML/Graphics.hpp>
usingnamespace sf;
int main()
{
// Create the main rendering window
sf::RenderWindow App(sf::VideoMode(800, 600, 32), "SFML Graphics");
// Start game loop
while (App.IsOpened())
{
// Process events
sf::Event Event;
while (App.GetEvent(Event))
{
// Close window : exit
if (Event.Type == sf::Event::Closed)
App.Close();
}
// Clear the screen (fill it with black color)
App.Clear();
// Display window contents on screen
App.Display();
}
return EXIT_SUCCESS;
}
second, after clicking SFML project and compiling the same code i get both a console and a window that open up, is that suppose to happen? and by killing the console the window also closes?
thirdly, i have no idea what to do... in console i know why this is there and that is here, but i look at some of this example code that brings up a window and get confused?
Yes, that's normal. The console window allows you to see the console output of your application, if there is any. It won't show up when you start the program outside of the IDE.
If you don't want the console window, go to Project/Properties/Build targets and change the types of your build targets from "Console application" to "GUI application".
thirdly, i have no idea what to do... in console i know why this is there and that is here, but i look at some of this example code that brings up a window and get confused?
Well, read the SFML tutorial. I assume all of that will be explained.
im not sure if it did what it was suppose to do, but a console came up, and a window with a microsoft looking symbol in the upper left corner was there with a pitch black screen, and thats it lol
Yes, unless you use makefiles. Although I see no point in using more than one IDE for the same language (except those that have a specific application area, such as Qt Creator).
im not sure if it did what it was suppose to do, but a console came up, and a window with a microsoft looking symbol in the upper left corner was there with a pitch black screen, and thats it lol
Of course. The application doesn't do anything more than that, so it's to be expected.