This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: crypt 1.0-1 - Errors linking a C program
- From: "Jon Foster" <jon at jon-foster dot co dot uk>
- To: "Ben Stewart" <ben at whsc dot vic dot edu dot au>,<cygwin at cygwin dot com>
- Date: Sat, 2 Feb 2002 14:33:41 -0000
- Subject: Re: crypt 1.0-1 - Errors linking a C program
- References: <000901c1abe0$96107710$1066460a@garbageworld>
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@jon-foster.co.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/