Skip to content

zzjjzzgggg/cpplib

Repository files navigation

Introduction

A collection of useful C++ libraries.

Install on Linux

Install cmake, g++, gcc, and libgflags-dev.

sudo apt install cmake g++ gcc libgflags-dev 7za-full

7za-full is used for handling gzip compression file IO.

Clone cpplib

Then clone the repository into directory $ENV{GIT_REPO}/cpplib. Here GIT_REPO is an environment variable (e.g., defined in .zshenv).

git clone --recursive https://github.com/zzjjzzgggg/cpplib.git

Compile

mkdir build
cd build
cmake ..
make

Tell cmake where to find the library

This requires another repository cmake.

git clone https://github.com/zzjjzzgggg/cmake.git

Then add following line in your project CMakeLists.txt.

set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} $ENV{GIT_REPO}/cmake)

Tell make where to find the library

Set environment variable CPPLIB_DIR in .zshenv or other place, e.g.,

export CPPLIB_DIR=$HOME/git_project/cpplib

In your Makefile, add follows

IDIR=-I$(CPPLIB_DIR) -I/usr/include/gflags
LIBS=-L$(CPPLIB_DIR)/lib -losutils -lioutils -lstrutils -lgflags

test: test.cpp
  g++ $(IDIR) $(LIBS) -Wall -o $@ $<

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published