I have a library A that requires hdf5. It only needs the serial version.
However, it also links with B that is linked with the parallel version, as it uses some of the parallel symbols.
While linking, I link like -lhdf5 -lB, which returns without errors, as all symbols in A are satisfied, but fails later at run time, because B has undefined symbols, as the serial version of hdf5 is linked.
I am not sure about this, but I think the clean solution would be to split out the parallel symbols into a sub-library, and if parallel symbols are expected, pull in the sub-library.
That way the serial version cannot conflict with the parallel version.
I have a library
A
that requires hdf5. It only needs the serial version. However, it also links withB
that is linked with the parallel version, as it uses some of the parallel symbols. While linking, I link like-lhdf5 -lB
, which returns without errors, as all symbols inA
are satisfied, but fails later at run time, becauseB
has undefined symbols, as the serial version ofhdf5
is linked.I am not sure about this, but I think the clean solution would be to split out the parallel symbols into a sub-library, and if parallel symbols are expected, pull in the sub-library.
That way the serial version cannot conflict with the parallel version.