QT Program release Linux version, software packaging Knowledge (patchelf tools to modify the dependent library, confirm that Qmake-v is the QT version of its own use, otherwise modified with export path) good

Source: Internet
Author: User

The Patchelf tool can modify the dependent library location of the compiled run program and specify the library linker

Patchelf--set-rpath

Patchelf--set-interpreter

With this tool HTTPS://GITHUB.COM/PROBONOPD/LINUXDEPLOYQT if you do not compile, you can also download the ready-made

Https://github.com/probonopd/linuxdeployqt/releases

Run./linuxdeployqt-2-x86_64.appimage shanbaydict and for success, the generated Lib directory has very few so files.

Run./linuxdeployqt-2-x86_64.appimage Shanbaydict-appimage was unsuccessful, but Lib generated many so files

After modifying rpath with Patchelf--set-rpath/opt/qt-5.7-static/lib/:./lib shanbaydict, Shanbaydict can run independently and copy to the newly installed Ubuntu together with Lib 16.04 system, can also be run.

LDD Shanbaydict shows that Rpath has pointed to the./lib Directory

Patchelf can be installed via sudo apt install patchelf

February 24, 2017

QT 5.8 compiled QT program

Set the environment variables to confirm that Qmake-v is the QT version that you use, and if not, the solution is:

Export Path=/home/lieefu/qt5.8.0/5.8/gcc_64/bin: $PATH

Create the QML directory, the/HOME/LIEEFU/QT5.8.0/5.8/GCC_64/QML directory to use the module copied over, my app used three QtQuick, Qtquick.2, Qtmultimedia.

Add plugin platforminputcontexts include libfcitxplatforminputcontextplugin.so file, you can use Sogou Input method to enter Chinese characters

./linuxdeployqt-continuous-x86_64.appimage Lilydict-appimage

This command runs on both sides of the line, to solve this bug https://github.com/probonopd/linuxdeployqt/issues/64

The libqxcb.so rpath hadn ' t been set correctly.
Running patchelf--set-rpath ' $ORIGIN/. /.. /lib ' plugins/platforms/libqxcb.so

Re-set the XCB library again with the second run Rpath

March 2, 2017, the latest version of Linuxdeployqt-continuous-x86_64.appimage, does not need to run both sides of the

https://my.oschina.net/lieefu/blog/756712

QT Program release Linux version, software packaging Knowledge (patchelf tools to modify the dependent library, confirm that Qmake-v is the QT version of its own use, otherwise modified with export path) good

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.