LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Which package to install as development package? (https://www.linuxquestions.org/questions/programming-9/which-package-to-install-as-development-package-750332/)

cpthk 08-26-2009 05:01 AM

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?

weibullguy 08-26-2009 05:27 AM

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.

cpthk 08-26-2009 01:02 PM

Quote:

Originally Posted by weibullguy (Post 3657989)
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?

GrapefruiTgirl 08-26-2009 01:08 PM

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

cpthk 08-26-2009 07:35 PM

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.

weibullguy 08-26-2009 07:42 PM

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.

cpthk 08-26-2009 08:03 PM

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


All times are GMT -5. The time now is 05:35 PM.