A simple, easy to use library to make simultaneous progress, loading bars in c++
-
Open a terminal and clone library wherever you desire and move there
$ git clone https://github.com/keybraker/libloader.git && cd libloader
-
Create library
- for use in current direcotry
$ make lib
- for use globally (moves to root path so you can access it from anywhere)
$ make lib-root
Linking library to you projects is done in two easy steps
-
if library is in custom path
- include libloader inside a cpp file you are using it:
#include "custom_path/libloader.h"
- link loader library at compile time:
$ g++ -Wall -o loading src/exp_loading_bar.cpp -L. -lloader
-
if library is in root path
- include libloader inside a cpp file you are using it:
#include <libloader.h>
- ilink loader library at compile time:
$ g++ -Wall -o loading src/exp_loading_bar.cpp -I/usr/local/include -L/usr/local/lib -lloader
note that -L is the linking flag for L_ibraries_ and what follows is the path to find it
-
exp_loading_bar.cpp
$ make loading
Loading bar is a bar with moving dots representing progress. Percentage with elapsed time is shown and dynamically changed from seconds to minutes.
-
exp_progress_bar.cpp
$ make progress
Progress bar is a bar with '=' characters increasing as process nears completion. Percentage with elapsed time is shown and dynamically changed from seconds to minutes.
-
exp_pingpong_bar.cpp
$ make pingpong
Ping Pong is a table indicating processing but not percentage of completion. Percentage with elapsed time is shown and dynamically changed from seconds to minutes.