在unix上编译pro *c程序,引用了头文件,编译出错: $ make -f demo1.mk EXE=demo cc -o demo demo.c -I/oracle/product/8.1.7/precomp/public -L/oracle/product/8.1. 7/lib -lclntsh -lpthread -lsql8 "./time.h", line 24: #error: ERROR: Only Mac or Win32 targets supported! cc: acomp failed for demo.c *** Error code 2 make: Fatal error: Command failed for target `demo' 是不是在上不能用啊,那我怎么得到当前时间呢?
by zy.mable - C/C++ - 2004-03-12 22:30:39 阅读(815) 回复(4)
在unix上编译pro *c程序,引用了头文件,编译出错: $ make -f demo1.mk EXE=demo cc -o demo demo.c -I/oracle/product/8.1.7/precomp/public -L/oracle/product/8.1. 7/lib -lclntsh -lpthread -lsql8 "./time.h", line 24: #error: ERROR: Only Mac or Win32 targets supported! cc: acomp failed for demo.c *** Error code 2 make: Fatal error: Command failed for target `demo' 是不是在上不能用啊,那我怎么得到当前时间呢?
在使用cygwin时,编译一个C文件,错误提示是缺失sys/time.h头文件,请问怎么能把它填上? 这个C文件是在unix下编写的,用cygwin能实现嘛?
小弟初学unix下编程,以下代码出现编译错误 #include <time.h>; time_t timeData; time(&timeData); tm* ptm; ptm = gmtime(&timeData); printf("\n year since 1900 : %d",ptm->;tm_year); gcc time1.out 编译报错 time1.out:10: 'tm' undeclared (first use in this function) 后三句改为printf("\n year since 1900 : %d",gmtime(&timeData)->;tm_year); 工作正常。 这是怎么回事?望熟悉的仁兄赐教。
tm结构转化成time_t时,time_t==long, 当时间>;2036左右时,秒数超出long的取值 范围, <time.h>;中的函数不能工作,如何解决!!!
The time difference will cause many problem while sharing data between linux and Windows servers. Actually, this issue occurs also among windows servers. To solve this issue, the Windows domain server will startup a time server. Every time the workstation starts up, it will sychronize its time with the server. Since the time server runs over the standard protocol NTP, the linux server can also syn...