ggininder
ggininder

Reputation: 161

How do I package all dependencies libraries of my c++ project in linux

I'm first time using Linux and I have to use QT to make some c++ programs.

In windows, the easiest way to package the dependency libraries is to put all *.dll file with my *.exe into a folder and throw it to somebody.

What's the counterpart in linux to do the similar things. I didn't find any *.exe and *.dll in linux.

Upvotes: 0

Views: 1139

Answers (1)

Nicholas Smith
Nicholas Smith

Reputation: 11754

So the canonical reference to this problem is this: http://doc.qt.io/qt-5/linux-deployment.html

With Linux you're best off sticking to the shared library approach, which you can either package yourself in a .tar for distribution, and you can find the dependencies by using readelf -d and then find / | grep '<dep-name>'. The other option is to distribute your binary as an rpm/deb/other which lists the dependencies it needs to run and will install them through the package manager.

Upvotes: 1

Related Questions