Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. trying to build standalone app
Qt 6.12 LTS is out! See what's new in the release blog

trying to build standalone app

Scheduled Pinned Locked Moved Solved General and Desktop
22 Posts 6 Posters 6.7k Views 4 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.
  • aha_1980A Offline
    aha_1980A Offline
    aha_1980
    Lifetime Qt Champion
    wrote on last edited by aha_1980
    #13

    Hi @mzimmers ,

    Just to add one important piece for dynamic linking on Windows, which was not explicited state before, I think:

    • The *.lib file is needed at link time, it does not need to be deployed with the application
    • The *.dll file is needed at run time, it needs to be deployed

    Qt has to stay free or it will die.

    K 1 Reply Last reply
    4
    • aha_1980A aha_1980

      Hi @mzimmers ,

      Just to add one important piece for dynamic linking on Windows, which was not explicited state before, I think:

      • The *.lib file is needed at link time, it does not need to be deployed with the application
      • The *.dll file is needed at run time, it needs to be deployed
      K Offline
      K Offline
      koahnig
      wrote on last edited by
      #14

      @aha_1980 said in trying to build standalone app:

      Hi @mzimmers ,

      Just to add one important piece for dynamic linking on Windows, which was not explicited state before, I think:

      • The .lib file is needed at link time, it does not need to be deployed with the application
      • The *.dll file is neede at run time, it needs to be deployed

      @koahnig said in trying to build standalone app:

      @mzimmers
      For windows, either you have one lib or you have a lib and a dll. If you got both you need the lib for liniking and the dll for execution.

      I acknowledge, a bit hidden ;)

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      1
      • mzimmersM Offline
        mzimmersM Offline
        mzimmers
        wrote on last edited by
        #15

        Still fooling around with this...I borrowed the code below from somewhere:

        myown_installs.files = "C:/Program Files (x86)/Expat 2.2.5/Bin/libexpat.lib" \
        	"C:/Program Files (x86)/Expat 2.2.5/Bin/libexpat.dll"
        myown_installs.path = $$OUT_PWD/release
        

        Which works fine for my builds to the /release subdirectory, but not for debugs. Is there some clever way to conditionalize this in my project file?

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

          Hi,

          Are you trying to make a standalone debug application ?

          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
          0
          • mzimmersM Offline
            mzimmersM Offline
            mzimmers
            wrote on last edited by
            #17

            Hi - no, but when I try to run the debugger, it crashes because these files aren't in the build directory.

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

              Ok, I see. Then use

              CONFIG(debug, debug|release){
                  # Debug specific stuff
              } else {
                  # Release specific stuff
              }
              

              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
              2
              • mzimmersM Offline
                mzimmersM Offline
                mzimmers
                wrote on last edited by
                #19

                I get a very unexpected error from this:0_1548282879804_creator.PNG

                Any idea what I'm doing wrong?

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

                  You have a } just after release.

                  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
                  3
                  • mzimmersM Offline
                    mzimmersM Offline
                    mzimmers
                    wrote on last edited by
                    #21

                    Oh, brother...I'd downvote myself for that if I could.

                    It works fine now...thanks, SGaist.

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

                      No worries, things like that happen ;)

                      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
                      0

                      • Login

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