W
W
WTFAYD2018-02-19 15:14:29
Qt
WTFAYD, 2018-02-19 15:14:29

How is the program linked with libraries and how can I run this program on another PC?

Hello!
Let's imagine that there is a program that uses a third-party library installed via make , for example, in /usr/lib/some-library-name (in my case it is Qwt ). I use it in a program, compile it on my computer, run it - it works. But let's say I want to run it on another computer, and I believe that it will not work, because this library will not be installed on it. What needs to be done to make this program work on another computer?
For example, to a program written in Qt Widgets using windeployqtdlls can be added to the folder with the executable file. Okay, but what about other libraries that don't provide such tools?
Thank you.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Movchan, 2018-02-19
@Alexander1705

Linking can be either static, when the library (.a or .lib) is immediately added to the executable file, or dynamic, when the library (.so or .dll) is loaded before the application starts.
In the second case, the libraries are usually installed by the package manager as project dependencies. Or by some installer, if the installation takes place on Windows.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question