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

Rob Siklos rsiklos@adexa.com
Mon Mar 31 16:22:00 GMT 2003


Hello,

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'
/c/DOCUME~1/rsiklos/LOCALS~1/Temp/ccqKF5Mc.o(.text+0x37):gettime.c:
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.

Thanks,

Rob.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cygcheck.out
Type: application/octet-stream
Size: 12183 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20030331/bb96ec45/attachment.obj>
-------------- next part --------------
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


More information about the Cygwin mailing list