Can be used in Visual Studio Code
This is a starter template for building C++ binaries using ncurses library and Bazel build system.
ncurses (new curses) is a library providing a set of APIs that allows the programmer to write text-based user interfaces in a terminal-independent manner. It is a toolkit for developing "GUI-like" application software that runs under a terminal emulator. It also optimizes screen changes, in order to reduce the latency experienced when using remote shells.
Well installing ncurses library is an easy task, you just have to follow the steps listed below:
sudo apt-get install libncurses5-dev libncursesw5-dev
- Install Homebrew (if not already):
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Install ncurses package:
$brew install ncurses
You can clone this repo using this command:
git clone https://github.com/ourarash/cpp-template.git
If you are running on ubuntu, first copy the files in ubuntu folder int to the root of this repo:
cp ubuntu/* ./
You can run this using blaze
:
bazel run src/hello_world_scroll_main:main
You can run unit tests using blaze
:
bazel test tests:tests
You can see a quick reference of ncurses APIs HERE
This repo uses Bazel
for building C++ files.
You can install Bazel using this link.