1

I'm trying to link some executable, built from C++ source files, and getting:

/usr/bin/ld: examples/CMakeFiles/whatever/main.cpp.o: undefined reference to symbol 'dlclose@@GLIBC_2.2.5'

Now, I know how to "fix" this:

How to fix undefined reference to symbol 'dlclose@@GLIBC_2.2.5' from glad.c

but - I don't understand where this dependency is coming from. I'm not dlopen'ing nor dlclose'ing anything that I know of, nor can I think of one of my dependency libraries which does so (although I can't be sure).

How do I investigate the origin of this requirement, to figure out "who's to blame" for the need for libdl?

Notes:

  • I have control of the build process via CMake.
  • I have access to the source files (but not the source file of dependency libraries - just their headers).
einpoklum
  • 118,144
  • 57
  • 340
  • 684

0 Answers0