Installing OpenMesh
OpenMesh can be compiled and used as both a static (.a) and shared library (.so). We'll download the source, configure build settings with 'cmake', and build it using 'make'. After all that's happened, we move the compiled library files to /usr/local/lib/ and the header files to /usr/local/include/. And finally, we'll have to update some configurations so that these library files will be found when compiling/linking to it later.
- Download the latest version of the OpenMesh sourcefiles from their downloads page (the .tar.gz or .tar.bz2 file)
- Extract it locally
- Go into the extracted folder and make a new folder inside called 'build'
- In your terminal, switch to the newly created 'build' folder:
cd /home/user/Downloads/OpenMesh-6.3/build/
- Configure the makefiles using cmake:
cmake ..
(include the two dots!) - Build the library:
make
- Move the all the compiled library files to /usr/local/lib/:
sudo mv /home/user/Downloads/OpenMesh-6.3/build/Build/lib/* /usr/local/lib/
- Move the folder with the header files we need to /usr/local/include/:
sudo mv /home/user/Downloads/OpenMesh-6.3/src/OpenMesh/ /usr/local/include/
- Run ldconfig so that your library loader can find it when running an application that needs the library:
sudo ldconfig -v
. To check, runldconfig -p | grep OpenMesh
and it should print a few library names containing OpenMeshCore and OpenMeshTools
https://github.com/TheWebMonks/meshmonk/blob/master/docs/ubuntu.md