解决参考 http://askubuntu.com/questions/190246/ld-cannot-find-math-library
you should use -lm
at the end.because unresolved symbols are found after gcc encounters montecarlo_time.o
and there is no library or anything else in which it can find it can resolve that symbol.
把 -lm 链接发到 -o 前面 ,放到链接其他库的最后面