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 In-Reply-To: To: cygwin AT cygwin DOT com MIME-Version: 1.0 Subject: Re: linking problems using gcc Message-ID: From: Fred Kulack Date: Thu, 25 Nov 2004 13:22:09 -0600 Content-Type: text/plain; charset="US-ASCII" X-IsSubscribed: yes On 11/25/2004 at 10:25:28 AM, cygwin-owner wrote: > I trying to link a small C/C++ program and I got linking error on time(), > rand() and srand(). These should be part of libc right? So way are they > missing? Has cygwin some special libc implementation or something??? --- end of excerpt --- This works for me. What is your output when compiling? #include #include #include int main(int argc, char **argv) { srand((unsigned int)time(NULL)); for (int i=0; i<10; ++i) { printf("Random #%d: %d\n", i, (int)rand()); } return 0; } "The stuff we call "software" is not like anything that human society is used to thinking about. Software is something like a machine, and something like mathematics, and something like language, and something like thought, and art, and information... but software is not in fact any of those other things." Bruce Sterling - The Hacker Crackdown Fred A. Kulack - IBM eServer iSeries - Enterprise Application Solutions ERP, Java DB2 access, Jdbc, JTA, etc... IBM in Rochester, MN (Phone: 507.253.5982 T/L 553-5982) mailto:kulack/us.ibm.com Personal: mailto:kulack/gmail.com AIM Home:FKulack AIM Work:FKulackWrk MSN Work: fakulack/hotmail.com (replace email / with @) -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/