- 论坛徽章:
- 0
|
开始用 makefile
写了一个 main.c 和一个 makefile ,是通过 ssh 传上去的.
刚开始老是出错:
[root@localhost analyse]# make
make: Warning: File `main.c' has modification time 1.4e+02 s in the future
cc -c -o main.o main.c
cc -o analyse main.o
make: warning: Clock skew detected. Your build may be incomplete.
好像是时间不对, 后来上网查了查,已经有了解决之道,
[root@localhost analyse]# touch main.c
[root@localhost analyse]# touch makefile
这样就OK了, 尽管我还不知道 touch 是什么意,大概是修改时间为当前时间的意思吧。
第一次用 makefile , 还是算成功了, 以后写C 程序,不用老是在编译时加一堆参数了, 在 makefile 里面写好就OK了
之后编遇到的问题及解决方法:
1、error while loading shared libraries: libmysqlclient.so.12: cannot open shared object file: No such file or directory
这是因为mysql不是安装在默认目录中的,所以需要告诉postfix应该到哪里去找libmysqlclient.so.12,使用ldconfig就可以达到这个目的:
# echo /usr/local/mysql/lib/mysql >> /etc/ld.so.conf
# ldconfig
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/12869/showart_67319.html |
|