This is the mail archive of the mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 1.3.22: (gcc) problem using gettimeofday with -mno-cygwin

On Mon, Mar 31, 2003 at 10:36:40AM -0500, Rolf Campbell wrote:
>Rob Siklos wrote:
>>I am trying to compile the following trivial program:
>>#include <stdio.h>
>>#include <sys/time.h>
>>int main()
>>  struct timeval tv;
>>  gettimeofday(&tv, NULL) ;
>>  printf("%ld %ld\n", tv.tv_sec, tv.tv_usec);
>>  return 0;
>>When I use gcc with no options, everything works fine.  However, if I use
>>the "-mno-cygwin" flag, I get the following error message:
>>gcc -Wall -mno-cygwin    gettime.c   -o gettime
>>gettime.c: In function `main':
>>gettime.c:7: warning: implicit declaration of function `gettimeofday'
>>undefined reference to `gettimeofday'
>>make: *** [gettime] Error 1
>>Anybody have any ideas?  I am using the latest versions of everthing from
>>the cygwin installer.  cygcheck file attached.
>My first idea:  Windows doesn't provide gettimeofday.


Please use the resources at rather than sending personal email.
Special for spam email harvesters: send email to aaaspam at sourceware dot org
and be permanently blocked from mailing lists at

Unsubscribe info:
Bug reporting:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]