Skip to content

Simple library with parser of mathematical expressions and operators from string (returns array of tokens with math expressions), translator to RPN and stack calculator. Also this lib contain simple strtok-like wrapper for calculations

License

Notifications You must be signed in to change notification settings

rostok2112/libcalc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

libcalc

Simple library with parser of mathematical expressions and operators from string (returns array of tokens with math expressions), translator to RPN and stack calculator. Also this lib contain simple strtok-like wrapper for calculations

GitHub license

Tools

GCC and Make

sudo apt install build-essential

CMake

sudo apt install cmake

... Or install this tools by yourself

Depends

Stack lib from:

https://github.com/rostok2112/libstack.git

Standart C math lib

Build

Just run

sh build.sh 

Or

./build.sh

If you need specific type of lib like shared, just run

sh build.sh SHARED

Or start build.sh by any another way

Usage

Just move calc.h from export/ to include/ dir and move libcalc.a to lib/ dir of your project

Also always link C math lib by -lm flag

Compile example with this lib:

gcc somesource.c -lm -lcalc -L./lib -I./include

Examples of usage and docs inside example/ dir

About

Simple library with parser of mathematical expressions and operators from string (returns array of tokens with math expressions), translator to RPN and stack calculator. Also this lib contain simple strtok-like wrapper for calculations

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published