SubStandardLibrary (SSTD) is a convenient functions-set for the C++ which the author wished that the standard library has these convenient functions. This library works on the GCC (g++) on the Ubuntu OS.
SubStandardLibrary (SSTD) は,著者が標準ライブラリにあって欲しかったと思う便利な関数群を収録した C++ 向けのライブラリです.Ubuntu OS 上の GCC (g++) で動作します.
- Installi build essentials
apt install build-essential
- Download this repository
- Copy all of under
./sstd/*
- Compile sstd
cd ./sstd make
- Add flags in your makefile
CFLAGS += -I./sstd/include -L./sstd/lib -lsstd CFLAGS += -std=gnu++0x
- Include a header (
#include <sstd/sstd.hpp>
) in your code
Below lines of makefile enable to update sstd by a $ make updateLib
command.
Adding $(LIB_SSTD)
as a depending lib to your makefile.
# when you need to check the change of files in lib, you need to change file name to a not-existing name like "FORCE_XXX".
#LIB_SSTD = FORCE_SSTD
LIB_SSTD = ./sstd/lib/libsstd.a
$(LIB_SSTD):
@echo ""
@unzip -n SubStandardLibrary-SSTD--master.zip
@mv SubStandardLibrary-SSTD--master/sstd ./
@rm -rf SubStandardLibrary-SSTD--master/
@(cd ./sstd; make -j)
.PHONY: updateLib
updateLib:
wget https://github.com/admiswalker/SubStandardLibrary-SSTD-/archive/master.zip -O SubStandardLibrary-SSTD--master.zip
-rm -rf sstd # remove previous versions of sstd
- Clone this repository
git clone [email protected]:admiswalker/SubStandardLibrary-SSTD-.git
- Edite under
sstd/src/
andtest/
- Compile
# ./docker/alpine/build.sh # if you use alpine docker env (Only for the init) # ./docker/alpine/run.sh # if you use alpine docker env make
- Run tests
./exe
Tagging rule: sstd-[VersionWrittenBySemanticVersioning]
git tag -a sstd-X.X.X -m 'sstd-X.X.X' [CommitHash]
git push origin sstd-X.X.X
File or directory name | Description Origin |
---|---|
sstd/ | Body of SSTD |
sstd/src/ | Source files of SSTD |
sstd/Makefile | Makefile to build SSTD |
sstd/compileOption.hpp | Define compilation options of SSTD |
sstd/sstd.hpp | Header file that collects all the header files of SSTD |
test/ | Test files for SSTD. This directory has a same structure with under sstd/src/ . |
.git/ | Git configulation and data files |
.github/ | Files for GitHub Actions |
Makefile | Makefile to build main.cpp for running tests of sstd |
README.md | This file |
googletest-master.zip | Zip archive of googletest to build test code (main.cpp and files under test/ ) |
main.cpp | Entrypoint to run tests under test/ |
test_c2py.py | Test file for sstd::c2py() to test sstd::c2py() calling python file on current directory. |
.gitignore | Git configulation file to ignore and not to track files |
Below libraries are incorporated in sstd.
Library name | URL | Used version | License | Intended use |
---|---|---|---|---|
md5 | github.com/kalven/md5 | committed on 1 Jan 2014 | Public domain | MD5 calculation |
WjCryptLib | github.com/WaterJuice/WjCryptLib | committed on 16 Mar 2018 | Public domain | SHA-1 calculation |
SHA-2 | github.com/kalven/sha-2 | committed on 27 Aug 2012 | Public domain | SHA-2 calculation |
- View the document (English & 日本語): admiswalker.github.io/sstdref/
- Repository of the document: github.com/admiswalker/sstdref
MIT licence or Public domain. (This software is dual license, so you can choose whichever you want).