QT5 implementation of TFTP and FTP method five: Using Qtftp to implement the method of FTP __ftp

Source: Internet
Author: User
Tags ftp transfer

Since the encounter FTP transfer file This task, I started to find can use QTFTP to achieve, but the online download compiled good library can not be used, back and forth for a long time, finally gave up, turn to cast curl, but the funny thing is this afternoon know how to do. Hey ~ ~ ~ ~ ~

1. Download Qtftp Source code

Note that I am talking about the source code, if you find a compiled library on the Internet, often can not use, and if you also use MinGW to compile, or honestly download the source code bar. The internet is not easy to find, I shared a, address is (http://download.csdn.net/detail/xueyushenzhou/9580401), points for 8, a bit expensive ah, but really good things.

Unzip the file after downloading.

Compilation environment: Win7 (64bit) +qt5.5.1+mingw492_32+qtftp 5.0.0
2. Move the Qt-qtftp folder to the C:\QT\QT5.5.1\5.5\SRC directory and rename it to Qtqtftp.

3, modify the C:\Qt\Qt5.5.1\5.5\Src\qtqtftp\src\qftp\qftp.pro file config-= shared as Config + = shared, without modification, you can only generate a static library.
4, open Qt command line, CD into the C:\Qt\Qt5.5.1\5.5\Src\qtftp directory, start compiling: Mingw32-make Makefile;
5. Copy the *.dll dynamic library files (Qt5Ftp.dll, Qt5Ftpd.dll) generated under the C:\Qt\Qt5.5.1\5.5\Src\qtftp\lib directory to C:\Qt\Qt5.5.1\5.5\mingw492_32\ Bin directory.
6. Copy the *.a and *.pri files generated under the C:\Qt\Qt5.5.1\5.5\\Src\qtftp\lib directory to the C:\Qt\Qt5.5.1\5.5\\mingw48_32\lib directory.
7. Copy the Qftp.h and qurlinfo.h in the C:\Qt\Qt5.5.1\5.5\\Src\qtftp\src\qftp directory to C:\Qt\Qt5.5.1\5.5\mingw492_32include\ The Qtnetwork directory.
8, in the C:\Qt\Qt5.5.1\5.5\mingw492_32\include\QtNetwork directory to create a new qftp file without a suffix, the content of #include "qftp.h."
OK, so that completes the QTFTP compilation.

The final step, test the effect, the example is C:\Qt\Qt5.5.1\5.5\\Src\qtftp\examples.

After starting, according to your configured FTP settings, detailed method please see a blog.


Select the file under the server, and then click Download to save the file to the program root directory.

Ok.


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.