Ubuntu releases QT program (ii)

Source: Internet
Author: User

Tag: INF path IMG Linux does not operate packing variable problem

Using LINUXDEPLOYQT to package QT programs

1. First, publish the program as release version under Linux. and create a new directory. Taking test485r as an example

2. Copy the files generated under the release directory to test485r

View

Under the test485r directory, run

Linuxdeployqt./test485-appimage

Can see, blew a mistake. Other missing libraries may be prompted, but that's not the problem, Ben.

Run

Linuxdeployqt./test485-appimage-no-plugins

As you can see, the compilation succeeds.

3. Copy the published program to a test machine that does not have QT installed.

Package the test485r and upload to the test machine.

Tar czvf Tesr485r.tar test485r/

Unzip on the test machine

TAR-XZVF Tesr485r.tar

Enter the directory after success

CD test485r

Execution./test485

The result was an error.

This time, you need to check dependencies. LS View directory, you can see there are plugins, into the plugins, into the Platforms,ls view, you can see libqxcb.so

Use the LDD command to view dependencies

As you can see, dependencies are no problem.

Go back to the program folder root directory

View the dependencies of Test485

It's no problem checking it out. All of them have a good library.

At this point, you need to consider the orientation of the environment variables

In this setting environment variables, directed to the program directory below

Export qt_plugin_path=/home/scdz/test485r/plugins/

Export ld_library_path=/home/scdz/test485r/plugins/platforms: $LD _library_path

Run./test485, success

My program, need to connect SQLite.

So, test the database and put it in the program folder.

Run again

Can manipulate the database

Ubuntu releases QT program (ii)

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.