Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Sorry this is such a beginner question, but I've recently begun programming with C++ on Ubuntu 12.10 and I've installed a few libraries I need to work with, for example PCL and I can't find them to add them to my project, I'm using QTcreator as the IDE and qmake which comes with it.

For example with PCL I followed the instructions on their site:

sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl
sudo apt-get update
sudo apt-get install libpcl-all

And as no problems occurred I have to assume they are correctly installed.

Most of the tutorial dealing with adding external libraries I've found on the web assume you're on windows and know where you downloaded the library.

Since I don't have experience with adding external libraries in C++, could someone please tell me in what file, if there is one, are libraries installed by default in Ubuntu?

What is the extension of these library files?

Is there a script/command which can help detect a library or all the libraries installed?

share|improve this question
add comment

2 Answers 2

up vote 3 down vote accepted

By default libraries are installed in /usr/lib

Usually extension of the library file is .so and corresponding header file will be .h

gui method for finding installed librarie is open software center->Developer tools-> Libraries

share|improve this answer
    
But it's the .so files you need to add, for example in qmake, and not the individual headers right? –  Bora George Dec 1 '12 at 22:07
add comment

The brute strength approach is:

sudo updatedb
locate libpcl

Updatedb takes a few moments; please be patient. The library you're looking for is likely in /usr/lib.

share|improve this answer
    
Besides this taking a bit longer are there any other draw backs which lead you to dubbing this the "brute strength" approach ? –  Bora George Dec 1 '12 at 17:03
    
Also this turns up a lot of files are not libraries, documentation etc about pcl, what is the extension files for libraries proper? –  Bora George Dec 1 '12 at 17:12
    
No real drawbacks. Documentation, you say? –  chili555 Dec 1 '12 at 21:48
    
Yes documentation related to PCL I filtered it out but a bit of a hassle. –  Bora George Dec 1 '12 at 22:49
1  
I thought maybe the documentation might be helpful. –  chili555 Dec 1 '12 at 23:00
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.