Skip to main content

Why does `ldd <dynamic_lib>` output "??? => ???" (question marks in both library [Resolved]

Running ldd , I noticed that there are some entries that read ??? => ???. Searching for a variety of combinations of "Linux", "ldd" and "??? => ???", both via search engine and on this site did not turn up anything.

Possibly relevant: the dynamic library in question was compiled on Windows 10 under MSYS2 using the built-in GCC Suite.


Question Credit: JDQ
Question Reference
Asked August 18, 2019
Posted Under: Unix Linux
38 views
2 Answers

For those running into the same issue on Windows under MSYS2 (using the GCC Suite to compile a shared library, linking an executable to that library, and then finding that dependencies are missing at runtime) you can,

  1. copy the shared library to the same directory as the executable.
  2. link to the shared library from the same directory as the executable.
  3. modify the path environment variable to include the directory that contains the shared library.

MSYS2 may provide a Unix-like environment on Windows, but we still need to adhere to the way in which Windows searches for executables (including shared libraries) at runtime (in short, LD_LIBRARY_PATH is meaningless and the linker does not care about paths supplied with rpath; PATH should be used).


credit: JDQ
Answered August 18, 2019
Your Answer
D:\Adnan\Candoerz\CandoProject\vQA