Standalone version of MinaCalc along with a C API for easy access and bindings
MinaCalc requires C++17.
The following commands assume GCC and Linux. Adjust the commands to your platform of choice
- Compile the source files:
g++ -std=c++17 -O2 -c MinaCalc/MinaCalc.cpp API.cpp
- If the C API is not needed, omit API.cpp:
g++ -std=c++17 -O2 -c MinaCalc/MinaCalc.cpp
- Link the object files together into a library:
ar rcs libminacalc.a *.o
#include <stdio.h>
#include "API.h"
int main() {
printf("calc version: %d\n", calc_version());
}
Run with gcc -lstdc++ -lm main.c libminacalc.a && ./a.out
(or equivalent for your platform and compiler)