79217767

Date: 2024-11-23 11:59:32
Score: 2.5
Natty:
Report link

I have the same question ... trying to work around the cumbersome/complicated C/C++ tooling.

Per other replies, there is no direct way to do it, since the linking of the dynamic libraries happen before the program is executed.

But one option could be to create a "packager" program, that embeds your program, the .so files, and then on-the-fly, this packager unpacks (and caches, so it only needs to do it once) your binary and the corresponding libraries and executes it.

The bazelisk tool does something like that -- except it doesn't embed the binaries, but downloads it. But the aspect of caching the wrapped binaries and passing along all the flags is the same.

Reasons:
  • Blacklisted phrase (1): I have the same question
  • Long answer (-0.5):
  • No code block (0.5):
  • Me too answer (2.5): I have the same question
  • High reputation (-1):
Posted by: Jan