LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-29-2022, 03:17 PM   #1
errigour
Member
 
Registered: May 2009
Posts: 366

Rep: Reputation: 6
-l crypt compiling cygwin


Guys im curious what linux package do i need to compile a program with -l crypt? I cant seem to find it with bing and the source im trying to compile seems to need -lcrypt but i dont know what package im looking for help me out. Specifically im using cygwin.
 
Old 04-29-2022, 03:20 PM   #2
errigour
Member
 
Registered: May 2009
Posts: 366

Original Poster
Rep: Reputation: 6
might be a stupid question cause im using cygwin but just thought i would ask here because i cant find it on the web.
 
Old 04-29-2022, 03:52 PM   #3
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,269
Blog Entries: 24

Rep: Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206
I am not a cygwin user so totally unfamiliar with what it provides, but you should be able to answer most questions about include files and linking from the man page.

If cygwin includes man pages see man crypt, or find it online here.

Usually the name of libs recognized by the linker are used without the 'lib' prefix so -lcrypt would imply libcrypt. Some like libmath may recogize abbreviations such as -lm as well.

Good luck!

UPDATE: I see you found the answer while I was updating my reply!

If your issue is solved please use the Thread Tools link above top post to make this question as SOLVED! Thanks!

Last edited by astrogeek; 04-29-2022 at 04:12 PM. Reason: Updated
 
Old 04-29-2022, 04:04 PM   #4
errigour
Member
 
Registered: May 2009
Posts: 366

Original Poster
Rep: Reputation: 6
i just found it sorry for the bother the package was libcrypt()
 
Old 04-29-2022, 08:12 PM   #5
errigour
Member
 
Registered: May 2009
Posts: 366

Original Poster
Rep: Reputation: 6
actually that didn't work installing that package but i moved on, is there a way to delete this forum post?
 
Old 04-29-2022, 09:29 PM   #6
astrogeek
Moderator
 
Registered: Oct 2008
Distribution: Slackware [64]-X.{0|1|2|37|-current} ::12<=X<=15, FreeBSD_12{.0|.1}
Posts: 6,269
Blog Entries: 24

Rep: Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206Reputation: 4206
What error message are you getting when you compile or link? (i.e. is the compiler failing or is the linker failing?)

Be sure to #include <unistd.h> in your source and check whether any feature test macros may be required for the functions you are using.

Re post removal: Once a question has had multiple views and/or replies they are not normally removed as that is potentially disrespectful of the time others may have spent considering the question.
 
Old 04-30-2022, 08:58 AM   #7
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,039

Rep: Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347Reputation: 7347
Quote:
Originally Posted by errigour View Post
Guys im curious what linux package do i need to compile a program with -l crypt? I cant seem to find it with bing and the source im trying to compile seems to need -lcrypt but i dont know what package im looking for help me out. Specifically im using cygwin.
Perhaps I don't understand, but this is just wrong.
You need to compile any app with -l crypt if that app needs it. And this information is available [usually] in the documentation of that app.
What do you want to compile at all?
 
Old 04-30-2022, 11:42 AM   #8
ntubski
Senior Member
 
Registered: Nov 2005
Distribution: Debian, Arch
Posts: 3,786

Rep: Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083Reputation: 2083
Quote:
Originally Posted by errigour View Post
i just found it sorry for the bother the package was libcrypt()
Quote:
Originally Posted by errigour View Post
actually that didn't work installing that package but i moved on, is there a way to delete this forum post?
General policy is not to delete old posts.

The correct package name is probably libcrypt-devel or something like that; usually package managers separate out the stuff required to compile in order to save bandwidth/space.
 
Old 04-30-2022, 01:32 PM   #9
NevemTeve
Senior Member
 
Registered: Oct 2011
Location: Budapest
Distribution: Debian/GNU/Linux, AIX
Posts: 4,880
Blog Entries: 1

Rep: Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871Reputation: 1871
Can be distribution-dependent. Ubuntu: libc6-dev, Centos: glibc-devel, Cygwin: libcrypt-devel

Last edited by NevemTeve; 04-30-2022 at 01:35 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] cygwin syntax random error during loop (how to reset cygwin?) fabriba Linux - General 11 07-29-2016 04:04 AM
[cygwin] How to use the cygwin.dll in Windows Programming Predatorian Programming 3 07-25-2014 10:45 AM
exim4 is in Cygwin 32 but not Cygwin 64 - is it an oversight or otherwise? fairch720 Linux - Software 0 08-27-2013 12:45 AM
Could I get rid of Cygwin.dll/Cygwin1.dll in program compiled under Cygwin ? Kunsheng Programming 1 05-17-2009 08:30 PM
Have you ever used cygwin, i've met a problem with the command stat from cygwin andy820303 Linux - Newbie 0 03-11-2009 03:37 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration