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 Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <009101c1abf6$9c5cda80$ad01a8c0@jj> From: "Jon Foster" To: "Ben Stewart" , References: <000901c1abe0$96107710$1066460a AT garbageworld> Subject: Re: crypt 1.0-1 - Errors linking a C program Date: Sat, 2 Feb 2002 14:33:41 -0000 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Hi Ben, > $ gcc -lcrypt -o app main.c > undefined reference to `crypt' > I've tried gcc with and without -lcrypt... any ideas? Try: $ gcc -o app main.c -lcrypt From http://cygwin.com/faq/faq_4.html#SEC93 : : gcc processes the files listed on the command line in : sequence and will only resolve references to libraries : if they are given after the file that makes the reference. Regards, Jon Foster -- "The knack of flying is learning how to throw yourself at the ground and miss." - Hitchhiker's Guide to the Galaxy E-mail: jon AT jon-foster DOT co DOT uk web: http://www.jon-foster.co.uk/ -- 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/