Do the following:
g++ -Iinclude -fpic lib/add.o -c impl/add.cc
g++ -Iinclude -fpic lib/sub.o -c impl/sub.cc
g++ -shared -o lib/libmymath.so lib/add.o lib/sub.o
g++ -Iinclude -Llib src/main.cpp -o test -lmymath
./test
Teaching myself shared libraries in C/C++.
Do the following:
g++ -Iinclude -fpic lib/add.o -c impl/add.cc
g++ -Iinclude -fpic lib/sub.o -c impl/sub.cc
g++ -shared -o lib/libmymath.so lib/add.o lib/sub.o
g++ -Iinclude -Llib src/main.cpp -o test -lmymath
./test
Teaching myself shared libraries in C/C++.
The Unlicense