Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. [Solved] QFtp and qt5 linking problem
Forum Updated to NodeBB v4.3 + New Features

[Solved] QFtp and qt5 linking problem

Scheduled Pinned Locked Moved General and Desktop
29 Posts 8 Posters 17.7k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • JKSHJ Offline
    JKSHJ Offline
    JKSH
    Moderators
    wrote on last edited by
    #5

    I see.

    Try subscribing to the "Interest mailing list":http://lists.qt-project.org/mailman/listinfo/interest and asking your question there -- Qt's engineers are active on that list and they'll have better inside knowledge about these compatibility modules.

    Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

    1 Reply Last reply
    0
    • G Offline
      G Offline
      grastvei
      wrote on last edited by
      #6

      the shared library QtFtp created a prl file. I added this file:
      @CONFIG -= create_prl@
      And now it works as expected.

      1 Reply Last reply
      0
      • D Offline
        D Offline
        darbor
        wrote on last edited by
        #7

        Hello
        In my case i not seeing

        #include <QtFtp> or <QFtp>

        but only

        #include <QtFtp/QtFtpDepends>

        1 Reply Last reply
        0
        • G Offline
          G Offline
          grastvei
          wrote on last edited by
          #8

          I compiled qftp into a shared library and linked the main application to the library.

          this is the .pro file for qftp
          @load(qt_build_config)
          Template = lib
          TARGET = QtFtp
          CONFIG += shared
          CONFIG -= create_prl
          QT = core network
          CONFIG += no_install_prl
          MODULE_PRI = ../../modules/qt_ftp.pri
          MODULE = ftp

          load(qt_module)

          Input

          HEADERS += qftp.h qurlinfo.h
          SOURCES += qftp.cpp qurlinfo.cpp
          @

          1 Reply Last reply
          0
          • D Offline
            D Offline
            darbor
            wrote on last edited by
            #9

            I have install QT 5.1.1
            download from git https://qt.gitorious.org/qt/qtftp

            extract to:
            C:\Qt\5.1.1\5.1.1\Src\qt-qtftp

            edit qftp.pro
            @
            load(qt_build_config)
            Template = lib
            TARGET = QtFtp
            CONFIG += shared
            CONFIG -= create_prl
            QT = core network
            CONFIG += no_install_prl
            MODULE_PRI = ../../modules/qt_ftp.pri
            MODULE = ftp

            load(qt_module)

            Input

            HEADERS += qftp.h qurlinfo.h
            SOURCES += qftp.cpp qurlinfo.cpp"@

            go to VC console.

            cd c:\Qt\5.1.1\5.1.1\Src\qt-qtftp\src\qftp
            qmake qftp.pro
            nmake
            nmake install

            after when I run examples from git qtftp i have this error

            C:\Qt\5.1.1\5.1.1\msvc2010_opengl\examples\network\qftp\ftpwindow.cpp:43: błąd:C1083: Cannot open include file: 'QtFtp': No such file or directory

            1 Reply Last reply
            0
            • G Offline
              G Offline
              grastvei
              wrote on last edited by
              #10

              I included qftp.h from library I build.

              1 Reply Last reply
              0
              • D Offline
                D Offline
                darbor
                wrote on last edited by
                #11

                Could you point me step by step how to do this.
                I am a beginner programmer QT.

                I copy qftp.h and qurlinfo.h to ftp example project,
                and
                add to qftp.pro
                line HEADERS += qftp.h qurlinfo.h

                but when i run project i have many errors like:

                C:\Qt\5.1.1\5.1.1\msvc2010_opengl\examples\network\build-qftp-Desktop_Qt_5_1_1_MSVC2010_32bit_OpenGL-Debug\debug\moc_qftp.cpp:125: błąd:C2027: use of undefined type
                'QFtpPrivate'
                c:\qt\5.1.1\5.1.1\msvc2010_opengl\examples\network\qftp\qftp.h:51: see declaration of 'QFtpPrivate'
                ...

                first error go to
                case 9: _t->d->_q_startNextCommand(); break;

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  grastvei
                  wrote on last edited by
                  #12

                  I can write more details about how to do this after work.

                  1 Reply Last reply
                  0
                  • D Offline
                    D Offline
                    darbor
                    wrote on last edited by
                    #13

                    Hello
                    It's work

                    1. build source qt-qtftp
                      qmake /Src/qt-qtftp/src/src.pro
                      nmake
                      nmake install

                    after
                    change in qt-qtftp/src/qftp/qftp.pro

                    @ CONFIG -= static
                    CONFIG += shared@

                    and compile again

                    in lib a have now
                    c:\Qt\5.1.1\5.1.1\msvc2010_opengl\lib\Qt5Ftp.dll
                    c:\Qt\5.1.1\5.1.1\msvc2010_opengl\lib\Qt5Ftpd.dll
                    c:\Qt\5.1.1\5.1.1\msvc2010_opengl\lib\Qt5Ftp.lib
                    c:\Qt\5.1.1\5.1.1\msvc2010_opengl\lib\Qt5Ftpd.lib
                    c:\Qt\5.1.1\5.1.1\msvc2010_opengl\lib\Qt5Ftpd.pdb
                    c:\Qt\5.1.1\5.1.1\msvc2010_opengl\lib\Qt5Ftp.prl
                    c:\Qt\5.1.1\5.1.1\msvc2010_opengl\lib\Qt5Ftpd.prl

                    1. create file in directory
                      c:\Qt\5.1.1\5.1.1\msvc2010_opengl\include\QtNetwork
                      QFtp
                      and inside add
                      @#include "qftp.h"@

                    2. copy from source two file
                      qftp.h and qurlinfo.h to includes\QtNetwork\

                    3. in my project add
                      @LIBS += Qt5Ftp.lib@
                      and
                      @QT += ftp@

                    and project finaly build and run:) jupiiii

                    1 Reply Last reply
                    0
                    • JKSHJ Offline
                      JKSHJ Offline
                      JKSH
                      Moderators
                      wrote on last edited by
                      #14

                      Thank you for sharing your solution!

                      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

                      1 Reply Last reply
                      0
                      • C Offline
                        C Offline
                        cygnus2k
                        wrote on last edited by
                        #15

                        Hello, I'm on Linux and I have the same problem. Compile the module as shared and static and in no way I can compile the examples. When you modified the .pro filedo not miss you put a -L parameter?

                        1 Reply Last reply
                        0
                        • D Offline
                          D Offline
                          Dacown
                          wrote on last edited by
                          #16

                          hi,
                          doesn't fit 100% to the theme, but I have tried it according to the instructions, but with the Creator.
                          The compilation works so far. However I have 3 problems:

                          cd qftp\ && C:\Qt\5.14.0\mingw73_32\bin\qmake.exe -o Makefile C:\Qt\qt-everywhere-src-5.14.0\qtbase\src\qtftp\examples\qftp\qftp.pro -spec win32-g++ "CONFIG+=qtquickcompiler"
                          Project ERROR: C:/Qt/qt-everywhere-src-5.14.0/qtbase/src/qtftp/examples/qftp/qftp.pro installs target to unexpected location.
                          mingw32-make[1]: *** [Makefile:43: sub-qftp-qmake_all] Error 3
                          mingw32-make[1]: Leaving directory 'C:/Qt/qt-everywhere-src-5.14.0/qtbase/src/build-qtftp-Desktop_Qt_5_14_0_MinGW_32_bit-Release/examples'
                          mingw32-make: *** [C:/Qt/qt-everywhere-src-5.14.0/qtbase/src/build-qtftp-Desktop_Qt_5_14_0_MinGW_32_bit-Release/Makefile:71: sub-examples-qmake_all] Error 2
                          

                          i simply removed module_qtftp_examples
                          I don't know if this is OK but now the compilation is running. And since they are only examples I think I should not have any problems.

                          Cannot read C:/../../tests/auto/other/headersclean/headersclean.pri: No such file or directory
                          

                          i have no solution for this, but i don't know if my mistakes result from this.

                          after compiling I only have the following files
                          libQt5Ftp.a
                          Qt5Ftp.dll
                          Qt5Ftp.dll.debug

                          but I still need
                          libQt5Ftpd.a
                          Qt5Ftpd.dll
                          but they're not made, so can anyone help me?

                          mrjjM 1 Reply Last reply
                          0
                          • D Dacown

                            hi,
                            doesn't fit 100% to the theme, but I have tried it according to the instructions, but with the Creator.
                            The compilation works so far. However I have 3 problems:

                            cd qftp\ && C:\Qt\5.14.0\mingw73_32\bin\qmake.exe -o Makefile C:\Qt\qt-everywhere-src-5.14.0\qtbase\src\qtftp\examples\qftp\qftp.pro -spec win32-g++ "CONFIG+=qtquickcompiler"
                            Project ERROR: C:/Qt/qt-everywhere-src-5.14.0/qtbase/src/qtftp/examples/qftp/qftp.pro installs target to unexpected location.
                            mingw32-make[1]: *** [Makefile:43: sub-qftp-qmake_all] Error 3
                            mingw32-make[1]: Leaving directory 'C:/Qt/qt-everywhere-src-5.14.0/qtbase/src/build-qtftp-Desktop_Qt_5_14_0_MinGW_32_bit-Release/examples'
                            mingw32-make: *** [C:/Qt/qt-everywhere-src-5.14.0/qtbase/src/build-qtftp-Desktop_Qt_5_14_0_MinGW_32_bit-Release/Makefile:71: sub-examples-qmake_all] Error 2
                            

                            i simply removed module_qtftp_examples
                            I don't know if this is OK but now the compilation is running. And since they are only examples I think I should not have any problems.

                            Cannot read C:/../../tests/auto/other/headersclean/headersclean.pri: No such file or directory
                            

                            i have no solution for this, but i don't know if my mistakes result from this.

                            after compiling I only have the following files
                            libQt5Ftp.a
                            Qt5Ftp.dll
                            Qt5Ftp.dll.debug

                            but I still need
                            libQt5Ftpd.a
                            Qt5Ftpd.dll
                            but they're not made, so can anyone help me?

                            mrjjM Offline
                            mrjjM Offline
                            mrjj
                            Lifetime Qt Champion
                            wrote on last edited by
                            #17

                            @Dacown
                            Hi
                            The names with d in the end - is normally the debug versions and
                            you are building in release mode so why you think you also need them ?
                            For debugging ?
                            Try build in debug mode and see.

                            1 Reply Last reply
                            1
                            • D Offline
                              D Offline
                              Dacown
                              wrote on last edited by
                              #18

                              Hi,
                              yes i think i need it for debugging, is that wrong ?
                              OK i will try it.

                              1 Reply Last reply
                              0
                              • D Offline
                                D Offline
                                Dacown
                                wrote on last edited by
                                #19

                                OK,
                                i just tried it:

                                C:/Qt/Tools/mingw730_32/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lQt5Ftpd
                                collect2.exe: error: ld returned 1 exit status

                                mrjjM 1 Reply Last reply
                                0
                                • D Dacown

                                  OK,
                                  i just tried it:

                                  C:/Qt/Tools/mingw730_32/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lQt5Ftpd
                                  collect2.exe: error: ld returned 1 exit status

                                  mrjjM Offline
                                  mrjjM Offline
                                  mrjj
                                  Lifetime Qt Champion
                                  wrote on last edited by
                                  #20

                                  @Dacown
                                  Hi
                                  Did you build both things in Debug then ?

                                  1 Reply Last reply
                                  0
                                  • D Offline
                                    D Offline
                                    Dacown
                                    wrote on last edited by Dacown
                                    #21

                                    @mrjj
                                    I have compiled the QFtp once in release mode and once in debug mode.
                                    I only got the files in each case:
                                    libQt5Ftp.a
                                    Qt5Ftp.dll

                                    C:/Qt/Tools/mingw730_32/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lQt5Ftpd
                                    collect2.exe: error: ld returned 1 exit status
                                    

                                    the error i get now is from a project that was running with QFtp before. i have now installed the latest QT version and wanted to include QFTP there again so i can continue using the project.
                                    I have tried to compile this project in debug modus

                                    mrjjM 1 Reply Last reply
                                    0
                                    • D Dacown

                                      @mrjj
                                      I have compiled the QFtp once in release mode and once in debug mode.
                                      I only got the files in each case:
                                      libQt5Ftp.a
                                      Qt5Ftp.dll

                                      C:/Qt/Tools/mingw730_32/bin/../lib/gcc/i686-w64-mingw32/7.3.0/../../../../i686-w64-mingw32/bin/ld.exe: cannot find -lQt5Ftpd
                                      collect2.exe: error: ld returned 1 exit status
                                      

                                      the error i get now is from a project that was running with QFtp before. i have now installed the latest QT version and wanted to include QFTP there again so i can continue using the project.
                                      I have tried to compile this project in debug modus

                                      mrjjM Offline
                                      mrjjM Offline
                                      mrjj
                                      Lifetime Qt Champion
                                      wrote on last edited by
                                      #22

                                      @Dacown

                                      You get this error when you try to use the Qt5Ftp from your app right ?

                                      1 Reply Last reply
                                      0
                                      • D Offline
                                        D Offline
                                        Dacown
                                        wrote on last edited by Dacown
                                        #23

                                        @mrjj
                                        yes if i try to compile it.

                                        I have tried now to compile QFTP on a other system.
                                        There it works i get the 4 files.

                                        Now i have test to compile my project on this machine, i have the same error.

                                        mrjjM 1 Reply Last reply
                                        0
                                        • D Dacown

                                          @mrjj
                                          yes if i try to compile it.

                                          I have tried now to compile QFTP on a other system.
                                          There it works i get the 4 files.

                                          Now i have test to compile my project on this machine, i have the same error.

                                          mrjjM Offline
                                          mrjjM Offline
                                          mrjj
                                          Lifetime Qt Champion
                                          wrote on last edited by
                                          #24

                                          @Dacown
                                          ok but if you get the dlls then
                                          just make sure you use the right version
                                          for the app.
                                          Release DLL for Release App
                                          and Debug Dll ( d in name) for Debug App
                                          Dont mix it.

                                          Also make sure the path you add to your pro file matches where you put the dll.

                                          1 Reply Last reply
                                          0

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved