if you get this error:
g++ -o pdemo pdemo.o -I../include -L../lib -lminipar -lz -lm
/usr/bin/ld: skipping incompatible ../lib/libminipar.a when searching for -lminipar
/usr/bin/ld: cannot find -lminipar
and you are on a 64-bit machine, add the compiler flag -m32 to tell it to consider a 32bit library.