- install ubuntu 14.04 LTS (64bit)
- run
sudo apt-get install build-essential
- download
http://lmb.informatik.uni-freiburg.de/resources/binaries/eccv2010_trackingLinux64.zip
- from:
http://lmb.informatik.uni-freiburg.de/resources/software.php
- unzip downloaded source
- run
make
within unzipped folder - run the example:
./tracking cars1.bmf 0 20 8
When running the compiled tracking program, the following error may occur:
error while loading shared libraries: libldof.so: cannot open shared object file: No such file or directory.
Assumption: unzppied files are located at: /home/simplay/rackingLinux64
What if we want to install our library so everybody on the system can use it? For that, you will need admin privileges. You will need this for two reasons: first, to put the library in a standard location, probably /usr/lib or /usr/local/lib, which normal users don’t have write access to. Second, you will need to modify the ld.so config file and cache. As root, do the following:
cp /home/username/foo/libfoo.so /usr/lib
eg. run sudo cp /home/simplay/trackingLinux64/libldof.so /usr/lib
chmod 0755 /usr/lib/libfoo.so
eg. run sudo chmod 0755 /usr/lib/libldof.so
Now the file is in a standard location, with correct permissions, readable by everybody. We need to tell the loader it’s available for use, so let’s update the cache:
run ldconfig
That should create a link to our shared library and update the cache so it’s available for immediate use. Let’s double check:
ldconfig -p | grep foo
eg. run ldconfig -p | grep ldof
libfoo.so (libc6) => /usr/lib/libfoo.so
Now our library is installed. Before we test it, we have to clean up a few things:
Clear our LD_LIBRARY_PATH
once more, just in case
unset LD_LIBRARY_PATH
run make
Let’s make sure we’re using the /usr/lib instance of our library using ldd:
ldd tracking | grep ldof
libldof.so (libc6, x86-64)=> /usr/lib/libldof.so
based on: http://www.cprogramming.com/tutorial/shared-libraries-linux-gcc.html