Aug 18, 2014 at 3:38pm Aug 18, 2014 at 3:38pm UTC
Hello
Well, I'm using Geany as me IDE and I really like it.
But I've got a problem with binding the SFML library to it.
I know it must be done by changing 'build' settings in 'set build commands'. But what do I need to type there?
Until now no one was able to really 100% help me, I asked several forums.
Thanks for reading,
Niely
Aug 18, 2014 at 7:06pm Aug 18, 2014 at 7:06pm UTC
Try adding -lsfml-graphics -lsfml-window -lsfml-system ... and so on ... at the end of the build command.
Aug 18, 2014 at 7:52pm Aug 18, 2014 at 7:52pm UTC
It doesn't give an error and just compiles (I don't think it builds).
But this is what the terminal gives:
./geany_run_script.sh: 5: ./geany_run_script.sh: ./test: not found
What I have as build setting:
g++ -Wall -c "%f" -L "/home/Name/SFML" -lsfml-graphics -lsfml-window -lsfml-system
(It's a simple code to draw a circle).
Last edited on Aug 18, 2014 at 7:52pm Aug 18, 2014 at 7:52pm UTC
Aug 19, 2014 at 6:26am Aug 19, 2014 at 6:26am UTC
Yeah that looks like a compile command. Are you sure you used/edit the right one? The build command is what you get when pressing F9 (by default). A build command should probably look something like this:
g++ -Wall -o "%e" "%f" -L "/home/Name/SFML" -lsfml-graphics -lsfml-window -lsfml-system
Note that that will only work for programs containing one source (.cpp) file.
Aug 19, 2014 at 9:43pm Aug 19, 2014 at 9:43pm UTC
I don't see window declared anywhere. You need something like sf::Window window;
Aug 19, 2014 at 9:51pm Aug 19, 2014 at 9:51pm UTC
Error: Window has no member named draw.
I think I'm getting close. :)
Aug 19, 2014 at 9:57pm Aug 19, 2014 at 9:57pm UTC
Last edited on Aug 19, 2014 at 9:58pm Aug 19, 2014 at 9:58pm UTC
Aug 19, 2014 at 10:05pm Aug 19, 2014 at 10:05pm UTC
It compiles without problems/errors. But still no circle. :)
Is it maybe because of my Linux terminal?
Aug 19, 2014 at 10:10pm Aug 19, 2014 at 10:10pm UTC
You need to have a loop that renders your window and other stuff. Go check the SFML tutorials for details.