Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Injected-Via-Gmane: http://gmane.org/ To: cygwin AT cygwin DOT com From: Rolf Campbell Subject: Re: 1.3.22: (gcc) problem using gettimeofday with -mno-cygwin Date: Mon, 31 Mar 2003 10:36:40 -0500 Lines: 36 Message-ID: References: <018101c2f79a$c4386650$cc0aa8c0 AT adexainc DOT com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet AT main DOT gmane DOT org User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) Gecko/20030312 X-Accept-Language: en-us, en In-Reply-To: <018101c2f79a$c4386650$cc0aa8c0@adexainc.com> Rob Siklos wrote: > Hello, > > I am trying to compile the following trivial program: > > (((( > #include > #include > > 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. My first idea: Windows doesn't provide gettimeofday. -- 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/