added macosx functionality, changed the sample, and added static libraries