Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct

    How to create the plugin of OCI for Qt

    General and Desktop
    2
    24
    8725
    Loading More Posts
    • 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.
    • K
      kirajustice last edited by

      I would like to first say that I'm sorry.
      I am a person of South Korea.
      Does not speak English.
      Says using Google Translate.
      Explained in Qt- website.
      how to create oci plugin
      But I will not be created.
      The following errors occurred.

      C:\Qt\5.3\Src\qtbase\src\sql\drivers\oci\qsql_oci.cpp:-1: error: undefined reference to OCIAttrGet' C:\Qt\5.3\Src\qtbase\src\sql\drivers\oci\qsql_oci.cpp:-1: error: undefined reference to OCISessionEnd'
      C:\Qt\5.3\Src\qtbase\src\sql\drivers\oci\qsql_oci.cpp:-1: error: undefined reference to OCIServerDetach' C:\Qt\5.3\Src\qtbase\src\sql\drivers\oci\qsql_oci.cpp:-1: error: undefined reference to OCIHandleFree'
      C:\Qt\5.3\Src\qtbase\src\sql\drivers\oci\qsql_oci.cpp:-1: error: undefined reference to OCIAttrSet' C:\Qt\5.3\Src\qtbase\src\sql\drivers\oci\qsql_oci.cpp:-1: error: undefined reference to OCIErrorGet'
      C:\Qt\5.3\Src\qtbase\src\sql\drivers\oci\qsql_oci.cpp:-1: error: undefined reference to OCINumberFromInt' . . . . . C:\Qt\5.3\Src\qtbase\src\sql\drivers\oci\qsql_oci.cpp:-1: error: more undefined references to OCIAttrGet' follow
      :-1: error: .obj/release/qsql_oci.o: bad reloc address 0x1 in section `.text$_ZN17QtMetaTypePrivate23QMetaTypeFunctionHelperIP7OCIStmtLb1EE6DeleteEPv[__ZN17QtMetaTypePrivate23QMetaTypeFunctionHelperIP7OCIStmtLb1EE6DeleteEPv]'
      collect2.exe:-1: error: error: ld returned 1 exit status

      I would appreciate someone to help us solve this problem.
      ㅠ_ㅠ

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi and welcome to devnet,

        Which version of Oracle did you install ?

        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 Reply Quote 0
        • K
          kirajustice last edited by

          Thank welcome. Nice.

          No, I did not install.
          So I've installed. oracle client 12g
          But another error has occurred.
          : -1: Error: can not find -loci
          collect2.exe: -1: error: error: ld returned 1 exit status

          can not find -loci
          Did not refer to the library.
          하지만 나는 참조했다.
          "LIBS + = library path"
          Library path = C: /app/client/yeongkyu/product/12.1.0/client_1/oci/lib/msvc/oci.lib
          I do not know why this result comes out.

          Thank you for your response.

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            @C:/app/client/yeongkyu/product/12.1.0/client_1/oci/lib/msvc/@

            is the path you should use

            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 Reply Quote 0
            • K
              kirajustice last edited by

              Thank you for answers.
              But did not build.

              : -1: Error: can not find -loci
              : -1: Error: can not find C: /app/client/yeongkyu/product/12.1.0/client_1/oci/lib/msvc/: Permission denied
              collect2.exe: -1: error: error: ld returned 1 exit status

              I think I'm get cancer because of this problem
              I want a solution. sorry

              1 Reply Last reply Reply Quote 0
              • SGaist
                SGaist Lifetime Qt Champion last edited by

                Did you saw that you have an additional space in the path that should not be there ?

                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 Reply Quote 0
                • K
                  kirajustice last edited by

                  Thank you for getting answers.
                  Are you saying that say the amount of C?
                  It is enough. 59 gigabytes
                  If I ever wrong to say
                  Use Google translator.
                  Check your answer by using it.
                  so sorry

                  1 Reply Last reply Reply Quote 0
                  • SGaist
                    SGaist Lifetime Qt Champion last edited by

                    No, I mean the space char e.g.

                    @C:/ << correct@

                    and

                    @C: / << wrong@

                    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 Reply Quote 0
                    • K
                      kirajustice last edited by

                      Thank you for getting answers.
                      But I was using the correct expression.

                      that the affected versions the Oracle client?
                      Oracle also has a 64-bit Windows because the 64-bit installation.
                      Does not seem like it.
                      I installed the 32-bit Oracle.
                      The same error occurs.
                      I saw it out.

                      you know what if the problem ?

                      1 Reply Last reply Reply Quote 0
                      • SGaist
                        SGaist Lifetime Qt Champion last edited by

                        Can you post the pro file ?

                        Which Qt package did you install ?

                        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 Reply Quote 0
                        • K
                          kirajustice last edited by

                          @TARGET = qsqloci

                          SOURCES = main.cpp
                          OTHER_FILES += oci.json
                          include(../../../sql/drivers/oci/qsql_oci.pri)
                          INCLUDEPATH += C:/app/yeongkyu/product/11.2.0/client_2/oci/include
                          LIBS += C:/app/yeongkyu/product/11.2.0/client_2/oci/lib/msvc/oci.lib
                          PLUGIN_CLASS_NAME = QOCIDriverPlugin
                          include(../qsqldriverbase.pri)
                          @

                          I installed.

                          qt 5.31 Prebuilt Components for Mingw 4.8.2 32-bit
                          qt 5.3.1 Source componets
                          tools>>mingw 4.8.2

                          I have installed by selecting the three looks.
                          How wrong I selected?
                          I think that's enough.

                          1 Reply Last reply Reply Quote 0
                          • SGaist
                            SGaist Lifetime Qt Champion last edited by

                            You can't expect to link a 64 bit to a 32bit Qt

                            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 Reply Quote 0
                            • K
                              kirajustice last edited by

                              Thank you for getting answers.

                              That is because it is the 64-bit Windows?
                              the mscv2013-64bit install and use it..?
                              So do I need to install the ms's visual studio?
                              Is it just that choose to install that in the package?

                              I installed Visual Studio 2013 and mscv2013-64bit
                              But it does not run.
                              The following error appears.

                              : -1: Error: LNK1181: 'oci.lib' can not open input file.

                              TT_TT

                              1 Reply Last reply Reply Quote 0
                              • SGaist
                                SGaist Lifetime Qt Champion last edited by

                                No, Windows 64 can run 32 bit applications. What you are doing is trying to link a 64 bit library to a 32 bit one, which is not possible.

                                Are you sure you gave the correct path ?

                                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 Reply Quote 0
                                • K
                                  kirajustice last edited by

                                  I saw run everything.

                                  oracle client qt
                                  32bit 32bit
                                  64bit 32bit
                                  64bit 64bit
                                  32bit 64bit

                                  But that was not the case successfully.
                                  If possible run in 64bit 32bit
                                  Why 32bit - 32bit is running does not?
                                  Also, why does not run 64bit-64bit?
                                  Were given the right path.
                                  error is the "can not opened oci.lib"
                                  because lib file is found this error occurs
                                  I think so.

                                  I would not find a solution in this case.
                                  It is imperative for your help.
                                  please help me. sorry

                                  1 Reply Last reply Reply Quote 0
                                  • SGaist
                                    SGaist Lifetime Qt Champion last edited by

                                    Please, ensure that you are using either both 32bit or 64bit version of the libraries (I mean Qt and Oracle) Next, check the compiler used to build Oracle's library and choose the one that matches with your Qt installation

                                    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 Reply Quote 0
                                    • K
                                      kirajustice last edited by

                                      Answer Thank you.
                                      So I checked.
                                      I installed qt mingw4.8.2 (32bit) and oracle client-win32 runtime (32bit).
                                      Is there something wrong here?
                                      Or do I need to add that same environment variables?
                                      : -1: Error: can not find -loci
                                      that can not find the oci libraries it?
                                      I do not know why would not find the library.

                                      1 Reply Last reply Reply Quote 0
                                      • SGaist
                                        SGaist Lifetime Qt Champion last edited by

                                        Can you post the path where this lib can be found ? Not the one you are using but the explorer's path

                                        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 Reply Quote 0
                                        • K
                                          kirajustice last edited by

                                          C:\app\yeongkyu\product\11.2.0\client_2\oci\lib\msvc
                                          oci.lib is here.

                                          C:\app\yeongkyu\product\11.2.0\client_2\oci\include
                                          oci.h is here.

                                          C:\Qt\5.3\Src\qtbase\src\plugins\sqldrivers\oci
                                          oci.pro is here

                                          C:\app\yeongkyu\product\11.2.0\client_2\BIN
                                          dll file is here.

                                          I have not touched since the Oracle installation.
                                          just Path and have only set up the build.
                                          only the lib and include paths

                                          1 Reply Last reply Reply Quote 0
                                          • SGaist
                                            SGaist Lifetime Qt Champion last edited by

                                            What else do you have in C:\app\yeongkyu\product\11.2.0\client_2\oci\lib\ ?

                                            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 Reply Quote 0
                                            • First post
                                              Last post