Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Unit tests don't find shared libraries at runtime (c++test v10.3)

glenn
glenn Posts: 1
edited June 2018 in C/C++test

I have a project containing unit tests that link against a shared library. The project is created using cpptestscan, with BDF files. The BDF files have correctly captured the compiler and linker options, including the one that tells the executable where to find the shared library (i.e., -Wl,-rpath,/path/to/library).

With v9.6, this all works fine -- the tests run. But with v10.3, the test executable can't find the shared library and the test fails to run. Comparing log outputs, this is because in v10.3 the linker option above isn't given. Another option, which sets the shared object name (-Wl,soname,[name]) is also missing. All other options are the same as v9.6.

Has anyone else seen this problem, or something similar to it?

Tagged: