compile sample.cc