Installing the correct version of a C/C++library
Often a library will have a seperate install for C or C++ and you need to install the correct one! Sounds obvious but with so many libraries having poor documentation this can be a simple thing that consfuses the hell out of you. Take for instance the libconfig library:
The C Version
Installing
sudo apt-get install libconfig-dev
Using
#include <libconfig.h> //This library needs the "-lconfig" adding to Project Properties > Build > Linker > Libraries
The C++ Version
Installing
sudo apt-get install libconfig++-dev //<<<<NOTICE THE DIFFERENT LIBRARY NAME!
Using
#include <libconfig.h++> //This library needs the "-lconfig++" adding to Project Properties > Build > Linker > Libraries
using namespace libconfig;
USEFUL?
We benefit hugely from resources on the web so we decided we should try and give back some of our knowledge and resources to the community by opening up many of our company’s internal notes and libraries through mini sites like this. We hope you find the site helpful.
Please feel free to comment if you can add help to this page or point out issues and solutions you have found, but please note that we do not provide support on this site. If you need help with a problem please use one of the many online forums.