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. Build project including all libs

Build project including all libs

Scheduled Pinned Locked Moved Unsolved General and Desktop
15 Posts 4 Posters 3.3k Views 2 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.
  • F Offline
    F Offline
    filipdns
    wrote on last edited by
    #1

    Hello, may it possible to setup the pro file to include all lib and files needed during build?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What do you mean by include all lib and files ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • F Offline
        F Offline
        filipdns
        wrote on last edited by
        #3

        I would like to have next my exe all is need to run it when I copy the folder and past it to an other PC Under windows

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          That's what windeployqt is for.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          5
          • F Offline
            F Offline
            filipdns
            wrote on last edited by
            #5

            I start to read it, and I think it's not easy to do... I will try

            1 Reply Last reply
            0
            • VRoninV Offline
              VRoninV Offline
              VRonin
              wrote on last edited by
              #6

              You can add this to your pro file to run it automatically
              https://stackoverflow.com/questions/6771039/automatic-copy-of-dependent-files-in-qt-creator

              "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
              ~Napoleon Bonaparte

              On a crusade to banish setIndexWidget() from the holy land of Qt

              F 1 Reply Last reply
              4
              • VRoninV VRonin

                You can add this to your pro file to run it automatically
                https://stackoverflow.com/questions/6771039/automatic-copy-of-dependent-files-in-qt-creator

                F Offline
                F Offline
                filipdns
                wrote on last edited by
                #7

                @VRonin Great thanks it's a begining lol

                Could you explain me litle bit more how to use that?

                DLLDESTDIR = ../../myproject/bin (... some dir's struct ...)

                QMAKE_POST_LINK = windeployqt --compiler-runtime $$DLLDESTDIR

                DLLDESTDIR -- full path with file name TARGET (dll and exe).

                I don't really see what I have to complete or replace in that..

                Sorry I'm litle bit stupid lol

                1 Reply Last reply
                0
                • VRoninV Offline
                  VRoninV Offline
                  VRonin
                  wrote on last edited by
                  #8

                  You chose the only answer with negative votes, I was referring to:

                  isEmpty(TARGET_EXT) {
                      win32 {
                          TARGET_CUSTOM_EXT = .exe
                      }
                      macx {
                          TARGET_CUSTOM_EXT = .app
                      }
                  } else {
                      TARGET_CUSTOM_EXT = $${TARGET_EXT}
                  }
                  
                  win32 {
                      DEPLOY_COMMAND = windeployqt
                  }
                  macx {
                      DEPLOY_COMMAND = macdeployqt
                  }
                  
                  CONFIG( debug, debug|release ) {
                      # debug
                      DEPLOY_TARGET = $$shell_quote($$shell_path($${OUT_PWD}/debug/$${TARGET}$${TARGET_CUSTOM_EXT}))
                  } else {
                      # release
                      DEPLOY_TARGET = $$shell_quote($$shell_path($${OUT_PWD}/release/$${TARGET}$${TARGET_CUSTOM_EXT}))
                  }
                  
                  #  # Uncomment the following line to help debug the deploy command when running qmake
                  #  warning($${DEPLOY_COMMAND} $${DEPLOY_TARGET})
                  
                  # Use += instead of = if you use multiple QMAKE_POST_LINKs
                  QMAKE_POST_LINK = $${DEPLOY_COMMAND} $${DEPLOY_TARGET}
                  

                  "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                  ~Napoleon Bonaparte

                  On a crusade to banish setIndexWidget() from the holy land of Qt

                  F 1 Reply Last reply
                  2
                  • F Offline
                    F Offline
                    filipdns
                    wrote on last edited by
                    #9

                    oups sorry

                    1 Reply Last reply
                    0
                    • VRoninV VRonin

                      You chose the only answer with negative votes, I was referring to:

                      isEmpty(TARGET_EXT) {
                          win32 {
                              TARGET_CUSTOM_EXT = .exe
                          }
                          macx {
                              TARGET_CUSTOM_EXT = .app
                          }
                      } else {
                          TARGET_CUSTOM_EXT = $${TARGET_EXT}
                      }
                      
                      win32 {
                          DEPLOY_COMMAND = windeployqt
                      }
                      macx {
                          DEPLOY_COMMAND = macdeployqt
                      }
                      
                      CONFIG( debug, debug|release ) {
                          # debug
                          DEPLOY_TARGET = $$shell_quote($$shell_path($${OUT_PWD}/debug/$${TARGET}$${TARGET_CUSTOM_EXT}))
                      } else {
                          # release
                          DEPLOY_TARGET = $$shell_quote($$shell_path($${OUT_PWD}/release/$${TARGET}$${TARGET_CUSTOM_EXT}))
                      }
                      
                      #  # Uncomment the following line to help debug the deploy command when running qmake
                      #  warning($${DEPLOY_COMMAND} $${DEPLOY_TARGET})
                      
                      # Use += instead of = if you use multiple QMAKE_POST_LINKs
                      QMAKE_POST_LINK = $${DEPLOY_COMMAND} $${DEPLOY_TARGET}
                      
                      F Offline
                      F Offline
                      filipdns
                      wrote on last edited by filipdns
                      #10

                      @VRonin Hello, I try that but now the exe is missing and I can not run the project from qt creator, I got modules missing message (all modules imported in my project) I received message module not installed when I try to run

                      1 Reply Last reply
                      0
                      • VRoninV Offline
                        VRoninV Offline
                        VRonin
                        wrote on last edited by
                        #11

                        That has nothing to do with the snipped I posted. Could you show us your entire .pro file? Did you rmember to build->re-run qmake?

                        "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                        ~Napoleon Bonaparte

                        On a crusade to banish setIndexWidget() from the holy land of Qt

                        F 1 Reply Last reply
                        0
                        • VRoninV VRonin

                          That has nothing to do with the snipped I posted. Could you show us your entire .pro file? Did you rmember to build->re-run qmake?

                          F Offline
                          F Offline
                          filipdns
                          wrote on last edited by filipdns
                          #12

                          @VRonin here my original pro file:

                          
                          TEMPLATE = app
                          
                          QT += qml quick widgets
                          CONFIG += c++11
                          
                          HEADERS += \
                          radialbar.h
                          
                          SOURCES += main.cpp\
                          radialbar.cpp
                          
                          RESOURCES += qml.qrc \
                              ../shared/shared.qrc
                          
                          # Additional import path used to resolve QML modules in Qt Creator's code model
                          QML_IMPORT_PATH =
                          
                          # Additional import path used to resolve QML modules just for Qt Quick Designer
                          QML_DESIGNER_IMPORT_PATH =
                          
                          # The following define makes your compiler emit warnings if you use
                          # any feature of Qt which as been marked deprecated (the exact warnings
                          # depend on your compiler). Please consult the documentation of the
                          # deprecated API in order to know how to port your code away from it.
                          DEFINES += QT_DEPRECATED_WARNINGS
                          
                          # You can also make your code fail to compile if you use deprecated APIs.
                          # In order to do so, uncomment the following line.
                          # You can also select to disable deprecated APIs only up to a certain version of Qt.
                          #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
                          
                          
                          # Default rules for deployment.
                          qnx: target.path = /tmp/$${TARGET}/bin
                          else: unix:!android: target.path = /opt/$${TARGET}/bin
                          !isEmpty(target.path): INSTALLS += target
                          

                          What do you mean with Did you rmember to build->re-run qmake?

                          Thank very much again for your help!!

                          jsulmJ 1 Reply Last reply
                          0
                          • F filipdns

                            @VRonin here my original pro file:

                            
                            TEMPLATE = app
                            
                            QT += qml quick widgets
                            CONFIG += c++11
                            
                            HEADERS += \
                            radialbar.h
                            
                            SOURCES += main.cpp\
                            radialbar.cpp
                            
                            RESOURCES += qml.qrc \
                                ../shared/shared.qrc
                            
                            # Additional import path used to resolve QML modules in Qt Creator's code model
                            QML_IMPORT_PATH =
                            
                            # Additional import path used to resolve QML modules just for Qt Quick Designer
                            QML_DESIGNER_IMPORT_PATH =
                            
                            # The following define makes your compiler emit warnings if you use
                            # any feature of Qt which as been marked deprecated (the exact warnings
                            # depend on your compiler). Please consult the documentation of the
                            # deprecated API in order to know how to port your code away from it.
                            DEFINES += QT_DEPRECATED_WARNINGS
                            
                            # You can also make your code fail to compile if you use deprecated APIs.
                            # In order to do so, uncomment the following line.
                            # You can also select to disable deprecated APIs only up to a certain version of Qt.
                            #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0
                            
                            
                            # Default rules for deployment.
                            qnx: target.path = /tmp/$${TARGET}/bin
                            else: unix:!android: target.path = /opt/$${TARGET}/bin
                            !isEmpty(target.path): INSTALLS += target
                            

                            What do you mean with Did you rmember to build->re-run qmake?

                            Thank very much again for your help!!

                            jsulmJ Offline
                            jsulmJ Offline
                            jsulm
                            Lifetime Qt Champion
                            wrote on last edited by
                            #13

                            @filipdns said in Build project including all libs:

                            What do you mean with Did you rmember to build->re-run qmake?

                            You need to rerun qmake each time you change pro file. Go to "Build/Run qmake" menu.

                            https://forum.qt.io/topic/113070/qt-code-of-conduct

                            1 Reply Last reply
                            1
                            • VRoninV Offline
                              VRoninV Offline
                              VRonin
                              wrote on last edited by
                              #14
                              1. Using both widgets and quick modules is a bit unusual
                              2. there is no trace of the snipped posted above in this file, where did you put it?

                              "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
                              ~Napoleon Bonaparte

                              On a crusade to banish setIndexWidget() from the holy land of Qt

                              F 1 Reply Last reply
                              0
                              • VRoninV VRonin
                                1. Using both widgets and quick modules is a bit unusual
                                2. there is no trace of the snipped posted above in this file, where did you put it?
                                F Offline
                                F Offline
                                filipdns
                                wrote on last edited by filipdns
                                #15

                                @VRonin I don't know, I start my project with QT exemple I didn't change more than the radialbar cpp and h

                                I'm new on QT I probably made some mistakes ;-)

                                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