This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: crypt 1.0-1 - Errors linking a C program


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]