Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ccmorataya/sfml_essentials
https://github.com/ccmorataya/sfml_essentials
Last synced: 15 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/ccmorataya/sfml_essentials
- Owner: ccmorataya
- Created: 2016-07-07T19:36:21.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-07-13T18:08:19.000Z (over 8 years ago)
- Last Synced: 2024-11-07T03:38:01.464Z (2 months ago)
- Language: C++
- Size: 43.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Example code about the book SFML Essentials
Develop the diferent examples trought the book using
`c++` and `Vim` of course the SFML libraryEverything is tested in **GNU/Linux** Using the **g++** compiler
## Compile and execute
```
$ g++ -c main.cpp
$ g++ main.o -o Demo -lsfml-graphics -lsfml-window -lsfml-system
$ ./Demo
```### Simplify the compiling
Add to the `.bashrc` or `.zshrc` or whatever shell RC file
to simplify the compile process```bash
function sfml++()
{
if [ -n "$1" ]
then
g++ "$1" -lsfml-graphics -lsfml-window -lsfml-system
fi
}
```Now you can use the following command
`$ sfml++ main.o`
instead the large
```$ g++ main.o -o Demo -lsfml-graphics -lsfml-window -lsfml-system```
To get a cleaner compiling and execution process:
```
$ g++ -c main.cpp
$ sfml++ main.o
$ ./a.out
```