Installing POCO library on Ubuntu - MDHSRobotics/TeamWiki GitHub Wiki
#Installing POCO library on Ubuntu
POCO is a C++ library containing useful components that make building C++ programs easier. To following steps will guide you in installing POCO in your Ubuntu environment. The Poco modules we will use are
- Foundation
- Util
- JSON
-
Ensure you have make 4.1. See the [Updating gmake on Ubuntu](Updating gmake on Ubuntu) tutorial if your version is not up to date.
-
download the POCO c++ source file from https://pocoproject.org/download/ and extract them to the
/tmp
directory -
navigate to the directory you just extracted. In my case this is achieved by issuing the following command:
cd /tmp/poco-1.7.8
-
Issue the following command to build the library:
./configure make -s
1. This will build the library files and place them a `lib` directory within the directory you extracted above. The headers are located within an include directory specific to each module of the POCO library. This arrangement makes it hard to use this library. Copy the files into standard system location as directed below:
1. create a folder for the include files:
```
sudo mkdir /usr/include/Poco
-
Copy the header files from the Poco modules listed above into this folder. The modules are located in folders that are named after the module name. These are located in the folder you extracted above. In each of the module folders, there is an
include
folder. Within theinclude
folder each will contain aPoco
folder. Copy the contents from each of thePoco
folder from each of the above modules to the/usr/include/Poco
folder you created. Assuming that your terminal is set to thePoco
folder you extracted above, the following commands should accomplish this.sudo cp -r Foundation/include/Poco/. /usr/include/Poco/ sudo cp -r Util/include/Poco/. /usr/include/Poco/ sudo cp -r JSON/include/Poco/. /usr/include/Poco/
1. Your system should already have a `/usr/local/lib` folder. If it does not, you can create it with the following command
```
sudo mkdir /usr/local/lib
-
Copy the Poco library files to this folder. The library files are located in the
lib
folder where you extracted and built the Poco Source. Assuming that your terminal is set to thePoco
folder you extracted above, the following commands should accomplish this. The structure on your system may be a little different, you may need to adjust the following commands to match your structure.sudo cp -r lib/Linux/x86_64/. /usr/local/lib