LinuxQuestions.org
Help answer threads with 0 replies.
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 08-26-2009, 05:01 AM   #1
cpthk
Member
 
Registered: Aug 2009
Posts: 31

Rep: Reputation: 15
Which package to install as development package?


I am trying to install some libraries. I realized in linux, package for example libxxxxx has libxxxxx, libxxxxx-dev, libxxxxx-dbg. What's the difference between them?

If I just need the library and the headers for my developing program, do I install libxxxxx-dev? Do I still need to install libxxxxx and libxxxxx-dbg?
 
Old 08-26-2009, 05:27 AM   #2
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
The libxxxxx contains the run time library, binaries, configuration files, documentation, etc. The libxxxxx-dev packages contains the headers and other files needed for development. I don't use binary distributions, so I don't know what is typically in the libxxxxx-dpg packages. I'm pretty sure the dbg indicates that it contains debugging symbols.
 
Old 08-26-2009, 01:02 PM   #3
cpthk
Member
 
Registered: Aug 2009
Posts: 31

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by weibullguy View Post
The libxxxxx contains the run time library, binaries, configuration files, documentation, etc. The libxxxxx-dev packages contains the headers and other files needed for development. I don't use binary distributions, so I don't know what is typically in the libxxxxx-dpg packages. I'm pretty sure the dbg indicates that it contains debugging symbols.
so if I am writing a program that contains a library, I need to install the libxxxxx and the libxxxxx-dev? Or only libxxxxx-dev?
 
Old 08-26-2009, 01:08 PM   #4
GrapefruiTgirl
LQ Guru
 
Registered: Dec 2006
Location: underground
Distribution: Slackware64
Posts: 7,594

Rep: Reputation: 553Reputation: 553Reputation: 553Reputation: 553Reputation: 553Reputation: 553
If the program you're writing requires to include functions or #define statements from any header files associated with libxxxx, then you will need libxxxx-dev installed.

To expand upon what weibullguy wrote:

Some (binary-only) distributions do not necessarily include all the header files and such, which would be needed to build against those tools or packages. They include only the compiled libs and/or binaries. In this case, you would want to install the libxxxx-dev package, so that the headers you are including (building against), are available.

Some distros, on the other hand, include ALL of the binaries, headers, libs, and everything, within their respective packages, so on that case, you'd already have the stuff required to build against.

I'm not sure if you'd need to ONLY install libxxx-dev, in the former case 'in general'. However, if your build process (the linking process) includes libs, as in '-l/usr/lib/libxyz123' or '-L/usr/lib' then it's definitely looking for some libs, and so will need the libxxxx package available.

Regards,
Sasha

Last edited by GrapefruiTgirl; 08-26-2009 at 01:23 PM. Reason: added further explanation.
 
Old 08-26-2009, 07:35 PM   #5
cpthk
Member
 
Registered: Aug 2009
Posts: 31

Original Poster
Rep: Reputation: 15
One last question, so if I install the libxxxxx and libxxxxx, does it comes with static library or shared library or both?

Because my project really need shared library instead of static. If it only has static library, what should I do to get the shared library one?

Thanks.
 
Old 08-26-2009, 07:42 PM   #6
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
libxxxxx generally will install shared libraries if there are shared libraries. I really don't know if the libxxxxx will also install the static library. If not, the libxxxxx-dev should. I only install source packages, so I end up with everything anyway.
 
Old 08-26-2009, 08:03 PM   #7
cpthk
Member
 
Registered: Aug 2009
Posts: 31

Original Poster
Rep: Reputation: 15
oh cool, in linux it's so much easier than windows, that we don't have to compile library our own.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
GTK2 Development Package marco.uk Slackware 4 04-27-2006 02:03 AM
Can't install Development Tools from package manager nick623 Linux - Newbie 0 01-19-2005 09:38 AM
development package victorxg Linux - Newbie 1 11-10-2004 03:09 PM
Mozilla Development package? AudioMechanic Linux - General 2 05-18-2004 10:12 PM
Does apt-get install <package> upgrade the package if it is already installed? davidas Debian 4 04-05-2004 06:12 PM

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

All times are GMT -5. The time now is 06:11 AM.

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