Add header and lib check, and fix paths in compile command