#!/bin/bash

###################################################################################
##
##  Example for building statically linked and dynamically linked  C++
##  JaguarLite programs
##
###################################################################################


echo "Static linking"
g++ -I$HOME/jaguarlite/include -static -o test_cpp_static test_cpp.cc $HOME/jaguarlite/lib/libjaguarlite.a -lcrypto  2>/dev/null
./test_cpp_static

echo "Dynamic linking"
export LD_LIBRARY_PATH=$HOME/jaguarlite/lib
g++ -I$HOME/jaguarlite/include -o test_cpp_dynamic test_cpp.cc -L$HOME/jaguarlite/lib -ljaguarlite -lGeographic -lgmp
./test_cpp_dynamic
