Compiled applications use installed library
I found the following behavior:
- Compile and install wolf core.
- Run a particular gtest e.g.
[dev]/wolf_core/bin/gtest_odom_2D
- Modify a certain cpp file used by the gtest. For example, I modified
processor_odom_2D.cpp
. - Compile but DO NOT INSTALL.
- Run the same gtest. The behavior is as if the
processor_odom_2D.cpp
file had not been modified!! - Install wolf core
sudo make install
. <== install the new version - Run the same gtest. The behavior accounts for the changes in the cpp file!! <== here it uses the new installed lib
Conclusion: the applications in [plugin]/bin
use dynamic libraries and those libraries if installed take preference over the local libraries. This second test demonstrates it (only points 6 and 7 are different!):
- Compile and install wolf core.
- Run a particular gtest e.g.
[dev]/wolf_core/bin/gtest_odom_2D
- Modify a certain cpp file used by the gtest. For example, I modified
processor_odom_2D.cpp
. - Compile but DO NOT INSTALL.
- Run the same gtest. The behavior is as if the
processor_odom_2D.cpp
file had not been modified!! - Uninstall wolf core
sudo make uninstall
. <== uninstall the old version - Run the same gtest. The behavior accounts for the changes in the cpp file!! <== here it uses the local uninstalled lib
What do you think of this behavior? It is very distracting!!! In the current state, we can make modifications to wolf, run and pass all ctest (because they use an outdated installed version of wolf), and end up commiting buggy files!!
I think this should be improved since the library being used is that of the same plugin, and when working locally it is distracting to see that the installed library is the one being used.
I have no idea how to tell cmake to take care of this!