0

I have a Fortran executable that statically links against a specific version of hdf5. The executable makes use of a C++ library foo that is statically linked against a different version of hdf5.

The executable refuses to link because of conflict in symbols. Is there a way to avoid this issue without making the C++ library foo dynamic?

1 Answers1

0

I have a Fortran executable that statically links against a specific version of hdf5. The executable makes use of a C++ library foo that is statically linked against a different version of hdf5.

This can work, but you must hide the fact that foo contains a version of the hdf5 library by hiding all of hdf5 symbols. Doing so will avoid symbol conflicts.

See this answer.

Employed Russian
  • 199,314
  • 34
  • 295
  • 362