Release of QT applications under Linux (use the LDD command to view all dependent library files)

Source: Internet
Author: User

recently has been learning Qt, using QT to write a program, but do not know how to publish, online is to say in Windows How to publish Qt application, but under Windows QT application depends on the library files and Linux under the name of different. So, I think of Linux there is no such a command, to find an executable file runtime depends on the library file, Baidu, there is really a LDD command.

the role of LDD is to print a shared library file that is dependent on the executable file, which is part of the glibc:

[Email protected]:~# ldd--help
USAGE:LDD [OPTION] ... FILE ...

--help Print this Help and exit
--version print version information and exit
-D,--data-relocs process data relocations
-R,--function-relocs process data and function relocations
-U,--unused print unused direct dependencies
-V,--verbose print all information
For bugs reporting instructions, please see:

[Email protected]:~# ldd--version
LDD (Ubuntu eglibc 2.17-0ubuntu5.1) 2.17
Copyright (C) Free Software Foundation, Inc.
This is free software; Please refer to the original code's copyright notice. The software does not provide any warranties, or even warranties of merchantability or suitability for any particular purpose.
Written by Roland McGrath and Ulrich drepper.

But I looked up the information on the Internet and found that LDD itself was not a program, but just a shell script, so I looked it up on the ubuntu13.04:

[Email protected]:~# which LDD
/usr/bin/ldd
[Email protected]:~# ls-al/usr/bin/ldd
-rwxr-xr-x 1 root root 5267 September 22:56/usr/bin/ldd
[Email protected]:~# file/usr/bin/ldd
/usr/bin/ldd:bourne-again shell script, ASCII text executable

Now know the nature of ldd, more LDD usage can Baidu. So I run the command to view the dynamic library:

[Email protected]:/mywork/mytest/myqq# ldd MYQQ
Linux-gate.so.1 = (0xb77a6000)
libqt5widgets.so.5 =/usr/lib/i386-linux-gnu/libqt5widgets.so.5 (0xb717b000)
libqt5sql.so.5 =/usr/lib/i386-linux-gnu/libqt5sql.so.5 (0xb713d000)
libqt5network.so.5 =/usr/lib/i386-linux-gnu/libqt5network.so.5 (0xb6fff000)
libqt5gui.so.5 =/usr/lib/i386-linux-gnu/libqt5gui.so.5 (0xb6c21000)
libqt5core.so.5 =/usr/lib/i386-linux-gnu/libqt5core.so.5 (0xb67ee000)
libstdc++.so.6 =/usr/lib/i386-linux-gnu/libstdc++.so.6 (0xb6705000)
Libgcc_s.so.1 =/lib/i386-linux-gnu/libgcc_s.so.1 (0xb66e8000)
libc.so.6 =/lib/i386-linux-gnu/libc.so.6 (0xb6533000)
libpthread.so.0 =/lib/i386-linux-gnu/libpthread.so.0 (0xb6518000)
libgobject-2.0.so.0 =/usr/lib/i386-linux-gnu/libgobject-2.0.so.0 (0xb64c8000)
libglib-2.0.so.0 =/lib/i386-linux-gnu/libglib-2.0.so.0 (0xb63c7000)
libx11.so.6 =/usr/lib/i386-linux-gnu/libx11.so.6 (0xb6290000)
libm.so.6 =/lib/i386-linux-gnu/libm.so.6 (0xb624c000)
Libz.so.1 =/lib/i386-linux-gnu/libz.so.1 (0xb6233000)
libpng12.so.0 =/lib/i386-linux-gnu/libpng12.so.0 (0xb620a000)
Libgl.so.1 =/usr/lib/nvidia-310/libgl.so.1 (0xb612a000)
libicui18n.so.48 =/usr/lib/i386-linux-gnu/libicui18n.so.48 (0xb5f56000)
libicuuc.so.48 =/usr/lib/i386-linux-gnu/libicuuc.so.48 (0xb5df0000)
libdl.so.2 =/lib/i386-linux-gnu/libdl.so.2 (0xb5deb000)
Librt.so.1 =/lib/i386-linux-gnu/librt.so.1 (0xb5de2000)
/lib/ld-linux.so.2 (0xb77a7000)
libffi.so.6 =/usr/lib/i386-linux-gnu/libffi.so.6 (0xb5ddb000)
Libpcre.so.3 =/lib/i386-linux-gnu/libpcre.so.3 (0xb5d9a000)
Libxcb.so.1 =/usr/lib/i386-linux-gnu/libxcb.so.1 (0xb5d77000)
libnvidia-tls.so.310.44 =/usr/lib/nvidia-310/tls/libnvidia-tls.so.310.44 (0xb5d73000)
libnvidia-glcore.so.310.44 =/usr/lib/nvidia-310/libnvidia-glcore.so.310.44 (0xb4051000)
libxext.so.6 =/usr/lib/i386-linux-gnu/libxext.so.6 (0xb403f000)
libicudata.so.48 =/usr/lib/i386-linux-gnu/libicudata.so.48 (0xb2ece000)
libxau.so.6 =/usr/lib/i386-linux-gnu/libxau.so.6 (0xb2ec9000)
libxdmcp.so.6 =/usr/lib/i386-linux-gnu/libxdmcp.so.6 (0xb2ec2000)

And then QT Library files required to run the QT application: libqt5core.so.5.0.1,libqt5gui.so.5.0.1,libqt5network.so.5.0.1,libqt5sql.so.5.0.1,libqt5widgets.so.5.0 .1 copy to the same folder as the executable file, and then package the compression to get the other Linux system running. Note: Many of the library files shown above are soft link files, so find the real library file in the appropriate folder.

http://blog.csdn.net/zyx_linux/article/details/20067335

Release of QT applications under Linux (use the LDD command to view all dependent library files)

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.