user1065942
user1065942

Reputation:

How to make the program dynamic-library-linked being portable?

this is my solution:

I move the program to another computer without any lib installed, read the error messeges and copy the lib one by one.

I have to repeat it several time until all library required is cpoied. In some cases, I don't know where is the lib neither do find it.

Is there any way make it easier?

Upvotes: 1

Views: 223

Answers (2)

William Pursell
William Pursell

Reputation: 212148

Use a package management system. They will differ depending on the flavor of linux, but just copying a binary from one machine to another is not the way to install software on a box. If you want to get /bin/foo from machine A, to machine B, figure out which package /bin/foo belongs to on A and then install that package on B. Downloading and installing all the dependencies should be as simple as:

$ aptitude install foo   # debian and debian derivatives

or

$ yum install foo        # rpm based distributions

Upvotes: -1

Sergey Kalinichenko
Sergey Kalinichenko

Reputation: 726479

Use Dependency Walker. It is a free utility that scans EXEs and DLLs, and builds a hierarchical tree diagram of all dependent modules.

Edit: On linux try binscan or ELF Library Viewer (from SO answer by J-16 SDiZ).

Upvotes: 1

Related Questions