摘要: 今天写C程序遇到了一个问题,错误提示如下:/tmp/ccDjB9kK.o: In function `is_prime':prime_estimate.c:(.text+0x1f): undefined reference to `sqrt'collect2: ld returned 1 exit status上述错误是在使用gcc的时候产生的,编译命令为:gcc my_prime_est.h prime_estimate.c prime_est_main.c把上面的命令替换为用g++编译gcc my_prime_est.h prime_estimate.c prime_est 阅读全文
posted @ 2012-04-11 16:16 shosciation 阅读(267) 评论(0) 推荐(0) 编辑