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. SQLAPI++ undefined reference error
Forum Updated to NodeBB v4.3 + New Features

SQLAPI++ undefined reference error

Scheduled Pinned Locked Moved Solved General and Desktop
16 Posts 6 Posters 1.9k 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.
  • SGaistS Offline
    SGaistS Offline
    SGaist
    Lifetime Qt Champion
    wrote on last edited by
    #5

    Hi,

    To add to my fellows, did you also check that the architecture of your library matches the one of your 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
    1
    • mrjjM mrjj

      Hi
      Make sure your mingw compiler version matches the version used for the
      precompiled libs
      "The SQLAPI++ comes with separated MinGW lib files "

      And you cannot use visual studio with mingw libs.

      P Offline
      P Offline
      PiotrWojtowicz
      wrote on last edited by
      #6

      @mrjj Thank you for your replay. I've checked my MinGW version and it's 7.3.0, in SQLAPI files there are only directory for MinGW_5.3, what should i do then ?

      ~"And you cannot use visual studio with mingw libs."
      I know, there are also folders for visual compiler, but i don't know how to connect QT 5.12.1 MSVC 2017 to a proper compiler. Can you please tell me how to do that or link a helpful article?
      Thank you.

      mrjjM 1 Reply Last reply
      0
      • P Offline
        P Offline
        PiotrWojtowicz
        wrote on last edited by
        #7

        @SGaist Tanks for response. I'm sorry but i don't know what you mean
        ~"the architecture of your library matches the one of your application"
        How to check that out?

        1 Reply Last reply
        0
        • P PiotrWojtowicz

          @mrjj Thank you for your replay. I've checked my MinGW version and it's 7.3.0, in SQLAPI files there are only directory for MinGW_5.3, what should i do then ?

          ~"And you cannot use visual studio with mingw libs."
          I know, there are also folders for visual compiler, but i don't know how to connect QT 5.12.1 MSVC 2017 to a proper compiler. Can you please tell me how to do that or link a helpful article?
          Thank you.

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

          Hi
          Using visual studio with QT 5.12.1 MSVC 2017 requires you to download
          the compiler from microsoft and install it. Make sure only to select the c++
          component as else it installs a tons extra.
          https://visualstudio.microsoft.com/downloads/

          also make sure the architecture matches (as @SGaist says) , that is if 32 bit libs or 64 bit libs as you app need to be the same. (to load them)

          Its not really clear from their site what visual studio version they support.
          https://www.sqlapi.com/

          Hmm it seems fairly old versions ??

          MSVC++ Visual Studio 6, 2005 (x86 and x86-64), 2010 (x86 and x86-64), 2012 (x86 and x86-64), 2013 (x86 and x86-64), 2017 (x86 and x86-64)

          MinGW g++ version 3.4, 4.8 (TDM x86 and x86-64), 4.9 (TDM x86 and x86-64), 5.1 (TDM x86 and x86-64)

          Do you have a license ?
          it says "SQLAPI++ ships with all the sources."
          so you might end up in needing to compile them yourself as to match compiler
          for lib and app and Qt.
          https://www.sqlapi.com/ApiDoc/build-lib/

          P 1 Reply Last reply
          3
          • mrjjM mrjj

            Hi
            Using visual studio with QT 5.12.1 MSVC 2017 requires you to download
            the compiler from microsoft and install it. Make sure only to select the c++
            component as else it installs a tons extra.
            https://visualstudio.microsoft.com/downloads/

            also make sure the architecture matches (as @SGaist says) , that is if 32 bit libs or 64 bit libs as you app need to be the same. (to load them)

            Its not really clear from their site what visual studio version they support.
            https://www.sqlapi.com/

            Hmm it seems fairly old versions ??

            MSVC++ Visual Studio 6, 2005 (x86 and x86-64), 2010 (x86 and x86-64), 2012 (x86 and x86-64), 2013 (x86 and x86-64), 2017 (x86 and x86-64)

            MinGW g++ version 3.4, 4.8 (TDM x86 and x86-64), 4.9 (TDM x86 and x86-64), 5.1 (TDM x86 and x86-64)

            Do you have a license ?
            it says "SQLAPI++ ships with all the sources."
            so you might end up in needing to compile them yourself as to match compiler
            for lib and app and Qt.
            https://www.sqlapi.com/ApiDoc/build-lib/

            P Offline
            P Offline
            PiotrWojtowicz
            wrote on last edited by PiotrWojtowicz
            #9

            @mrjj Ok i will try to download this microsoft compiler.

            I don't have license, i use trial version unfortunately i don't know how to "build" this library, can you please link some sources where i can learn how to do that?

            I'm sorry if i'm being annoying but as i mentioned i'm still learning.
            Thank you for your responses.

            mrjjM 1 Reply Last reply
            0
            • P PiotrWojtowicz

              @mrjj Ok i will try to download this microsoft compiler.

              I don't have license, i use trial version unfortunately i don't know how to "build" this library, can you please link some sources where i can learn how to do that?

              I'm sorry if i'm being annoying but as i mentioned i'm still learning.
              Thank you for your responses.

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

              @PiotrWojtowicz
              Hi
              The build instructions is here
              https://www.sqlapi.com/ApiDoc/build-lib/
              but you need the source.

              You are not annoying at all. Just ask good/detailed questions and you get good
              answers :)

              I think using the trial version with visual studio can work
              MSVC++ Visual Studio 6, 2005 (x86 and x86-64), 2010 (x86 and x86-64), 2012 (x86 and x86-64), 2013 (x86 and x86-64), 2017 (x86 and x86-64)

              Note you need a MS account to get VS 2017.
              I think 2019 also will work since they are said to be compatible.

              make sure to only INSTALL the c++ part as else it will install GIGABYTES of
              stuff.
              alt text

              1 Reply Last reply
              3
              • P Offline
                P Offline
                PiotrWojtowicz
                wrote on last edited by PiotrWojtowicz
                #11

                @mrjj Hi
                First of all THANK YOU i will definitely give it a try and write soon if it works for me.

                However you really interested me with build option.
                I've checked the docs on SQLAPI++ out but still i don't know how to build that. Can you please give me a hand with that one?
                How to add these build options to qmake or mingw32-make command ?

                mrjjM aha_1980A 2 Replies Last reply
                0
                • P PiotrWojtowicz

                  @mrjj Hi
                  First of all THANK YOU i will definitely give it a try and write soon if it works for me.

                  However you really interested me with build option.
                  I've checked the docs on SQLAPI++ out but still i don't know how to build that. Can you please give me a hand with that one?
                  How to add these build options to qmake or mingw32-make command ?

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

                  Hi
                  The docs says
                  "You should use appropriate batch file located in the src subdirectory of SQLAPI++ distribution (sqlapi_msvc.bat, sqlapi_bcc.bat, sqlapi_mingw.bat, sqlapi_gcc, sqlapi_ss). These files also allow to modify SQLAPI++ build options."

                  So it sounds like you can just edit the right bat file (sqlapi_msvc.bat)
                  and you should be able to set/unset the options needed/wanted.

                  Also a note about the many databases supported.
                  I would assume you will need to download their client libraries
                  so you have their headers and such. Its unlikely the source contains all of these.

                  1 Reply Last reply
                  3
                  • P PiotrWojtowicz

                    @mrjj Hi
                    First of all THANK YOU i will definitely give it a try and write soon if it works for me.

                    However you really interested me with build option.
                    I've checked the docs on SQLAPI++ out but still i don't know how to build that. Can you please give me a hand with that one?
                    How to add these build options to qmake or mingw32-make command ?

                    aha_1980A Offline
                    aha_1980A Offline
                    aha_1980
                    Lifetime Qt Champion
                    wrote on last edited by
                    #13

                    @PiotrWojtowicz,

                    I just wanted to mention the obvious: Qt already contains SQL drivers for popular databases, which includes very well into other parts of Qt.

                    So whats your reason to use this SQLAPI?

                    Regards

                    Qt has to stay free or it will die.

                    1 Reply Last reply
                    3
                    • P Offline
                      P Offline
                      PiotrWojtowicz
                      wrote on last edited by
                      #14

                      Ok guys thank you for help i eventually figure it out. Topic is closed.

                      JKSHJ 1 Reply Last reply
                      0
                      • P PiotrWojtowicz

                        Ok guys thank you for help i eventually figure it out. Topic is closed.

                        JKSHJ Offline
                        JKSHJ Offline
                        JKSH
                        Moderators
                        wrote on last edited by
                        #15

                        @PiotrWojtowicz said in SQLAPI++ undefined reference error:

                        Ok guys thank you for help i eventually figure it out.

                        Great!

                        Could you please share your solution in case it helps others?

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

                        P 1 Reply Last reply
                        3
                        • JKSHJ JKSH

                          @PiotrWojtowicz said in SQLAPI++ undefined reference error:

                          Ok guys thank you for help i eventually figure it out.

                          Great!

                          Could you please share your solution in case it helps others?

                          P Offline
                          P Offline
                          PiotrWojtowicz
                          wrote on last edited by
                          #16

                          @JKSH
                          Yes i actually downloaded and installed MSVS c++ compiler then connected it to the MSVC 2017 Kit (its is compaible with 2019 microsoft sdk) and set the LIBS += path to msvc2019 lib directory. Thank you again for help!

                          1 Reply Last reply
                          3

                          • Login

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