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. Cant connect to database if application is not opened via QT creator

Cant connect to database if application is not opened via QT creator

Scheduled Pinned Locked Moved Unsolved General and Desktop
12 Posts 5 Posters 3.3k Views
  • 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.
  • M Offline
    M Offline
    mardzo
    wrote on last edited by
    #3

    the windeployqt wont start on my machine. The dependency walker says it cant find
    LIBGCC_S_DW2-1.DLL
    LIBSTDC++-6.DLL
    QT5CORE.DLL
    QT5SQL.DLL

    but they are in the folder. :(

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

      -the windeployqt wont start on my machine.

      Really ?
      What does it say ?

      Also, just for check. This is a release .exe u are testing with?

      Also did u run Walker on the SQL plugin and see if it needs extra?
      Its often something like that.

      M 1 Reply Last reply
      0
      • the_T Offline
        the_T Offline
        the_
        wrote on last edited by
        #5

        Did you have a look at http://doc.qt.io/qt-5/windows-deployment.html as suggested by @mrjj?

        The windeployqt will copy all neccessary (Qt) dll files and folders into the folder where your compiled exe file is. In case of SQL you will also need the sqldrivers folder and the dll file(s) in there.

        -- No support in PM --

        M 1 Reply Last reply
        1
        • mrjjM mrjj

          -the windeployqt wont start on my machine.

          Really ?
          What does it say ?

          Also, just for check. This is a release .exe u are testing with?

          Also did u run Walker on the SQL plugin and see if it needs extra?
          Its often something like that.

          M Offline
          M Offline
          mardzo
          wrote on last edited by mardzo
          #6

          @mrjj I double click on the windeployqt, and window shows up for a second, but then it disappears. Yes, this is a release exe

          the_T jsulmJ 2 Replies Last reply
          0
          • the_T the_

            Did you have a look at http://doc.qt.io/qt-5/windows-deployment.html as suggested by @mrjj?

            The windeployqt will copy all neccessary (Qt) dll files and folders into the folder where your compiled exe file is. In case of SQL you will also need the sqldrivers folder and the dll file(s) in there.

            M Offline
            M Offline
            mardzo
            wrote on last edited by
            #7

            @the_ I already have the sqldrivers folder in my release folder and it contains the dlls

            1 Reply Last reply
            0
            • M mardzo

              @mrjj I double click on the windeployqt, and window shows up for a second, but then it disappears. Yes, this is a release exe

              the_T Offline
              the_T Offline
              the_
              wrote on last edited by
              #8

              @mardzo said in Cant connect to database if application is not opened via QT creator:

              @mrjj I double click on the windeployqt, and window shows up for a second, but then it disappears

              It is a commandline tool, so you can not just double click it from the file browser.

              -- No support in PM --

              1 Reply Last reply
              2
              • M mardzo

                @mrjj I double click on the windeployqt, and window shows up for a second, but then it disappears. Yes, this is a release exe

                jsulmJ Online
                jsulmJ Online
                jsulm
                Lifetime Qt Champion
                wrote on last edited by
                #9

                @mardzo said in Cant connect to database if application is not opened via QT creator:

                I double click on the windeployqt, and window shows up for a second, but then it disappears. Yes, this is a release exe

                You should read its documentation and not just double click on it (it is a command line tool not a GUI application).

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

                1 Reply Last reply
                1
                • M Offline
                  M Offline
                  mardzo
                  wrote on last edited by
                  #10

                  Im sorry guys i have never used it before. But now i did and windeployqt copied the same folder sqldrivers and also the others needed imageformats, platforms etc... I still have the same problem. If a Qt installation is not present, i cant connect to the db

                  mrjjM A 2 Replies Last reply
                  1
                  • M mardzo

                    Im sorry guys i have never used it before. But now i did and windeployqt copied the same folder sqldrivers and also the others needed imageformats, platforms etc... I still have the same problem. If a Qt installation is not present, i cant connect to the db

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

                    @mardzo
                    Ok super. then all Qt dlls should be ok. (hopefully)

                    Did you also check the actual sql plug with walker ?
                    to see if all is ok DLL wise ?

                    1 Reply Last reply
                    2
                    • M mardzo

                      Im sorry guys i have never used it before. But now i did and windeployqt copied the same folder sqldrivers and also the others needed imageformats, platforms etc... I still have the same problem. If a Qt installation is not present, i cant connect to the db

                      A Offline
                      A Offline
                      ambershark
                      wrote on last edited by
                      #12

                      @mardzo said in Cant connect to database if application is not opened via QT creator:

                      Im sorry guys i have never used it before. But now i did and windeployqt copied the same folder sqldrivers and also the others needed imageformats, platforms etc... I still have the same problem. If a Qt installation is not present, i cant connect to the db

                      What does your directory structure look like for your app after windeploy?

                      It should be something like this:

                      <root of your app>
                         plugins/
                            images/
                            platforms/
                            sqldrivers/
                         *.exe
                         *.dll
                      

                      Then you may also need a qt.conf file with this in the root of your app:

                      [Paths]
                      Plugins = plugins
                      

                      That should get you working and connected.

                      My L-GPL'd C++ Logger github.com/ambershark-mike/sharklog

                      1 Reply Last reply
                      2

                      • Login

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