I have installed two versions of opencv in my ubuntu12.04 machine , one in /usr/local/ (opencv3.0.0)
and another in /usr/ (opencv2.4.9).
To activate particular version i am using these commands in terminals.
Example :To activate opencv2.4.9,
sudo sh -c 'echo "/usr/" > /etc/ld.so.conf.d/opencv.conf' (shell script)
sudo ldconfig
export PKG_CONFIG_PATH=/usr/lib/pkgconfig
After executing these commands version is changing.
Checked with command, pkg-config --modversion opencv
.
Then i compiled my code and checked used libraries, Using ldd command,
It is listing opencv3.0.0
version not opencv2.4.9.
Please help correct way of switching opencv versions.
Thanks in advance