Make sure to have the environment variable ALGENCAN_LIB properly configured, such as below.
export ALGENCAN_LIB=/opt/algencan/lib/cd c/
gcc -O3 main.c -L${ALGENCAN_LIB} -lalgencan -lgfortran -lm -o algencan
./algencancd cpp/
g++ -O3 main.cpp -L${ALGENCAN_LIB} -std=c++20 -lalgencan -lgfortran -lm -o algencanpp
./algencanWhen using CMake, there is no need for setting the environment variable ALGENCAN_LIB,
since the FindALGENCAN will load it automatically.
cd cmake/
mkdir build
cd build
cmake ..
make
./main