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. How to create the plugin of OCI for Qt
Forum Updated to NodeBB v4.3 + New Features

How to create the plugin of OCI for Qt

Scheduled Pinned Locked Moved General and Desktop
24 Posts 2 Posters 10.6k Views 1 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.
  • K Offline
    K Offline
    kirajustice
    wrote on 2 Aug 2014, 17:28 last edited by
    #5

    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
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 2 Aug 2014, 19:23 last edited by
      #6

      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
      0
      • K Offline
        K Offline
        kirajustice
        wrote on 3 Aug 2014, 14:41 last edited by
        #7

        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
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 3 Aug 2014, 19:42 last edited by
          #8

          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
          0
          • K Offline
            K Offline
            kirajustice
            wrote on 4 Aug 2014, 00:27 last edited by
            #9

            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
            0
            • S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 4 Aug 2014, 07:36 last edited by
              #10

              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
              0
              • K Offline
                K Offline
                kirajustice
                wrote on 4 Aug 2014, 08:06 last edited by
                #11

                @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
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 4 Aug 2014, 22:01 last edited by
                  #12

                  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
                  0
                  • K Offline
                    K Offline
                    kirajustice
                    wrote on 5 Aug 2014, 01:05 last edited by
                    #13

                    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
                    0
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 5 Aug 2014, 07:51 last edited by
                      #14

                      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
                      0
                      • K Offline
                        K Offline
                        kirajustice
                        wrote on 5 Aug 2014, 09:07 last edited by
                        #15

                        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
                        0
                        • S Offline
                          S Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on 5 Aug 2014, 20:37 last edited by
                          #16

                          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
                          0
                          • K Offline
                            K Offline
                            kirajustice
                            wrote on 6 Aug 2014, 18:16 last edited by
                            #17

                            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
                            0
                            • S Offline
                              S Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on 6 Aug 2014, 21:13 last edited by
                              #18

                              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
                              0
                              • K Offline
                                K Offline
                                kirajustice
                                wrote on 7 Aug 2014, 00:19 last edited by
                                #19

                                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
                                0
                                • S Offline
                                  S Offline
                                  SGaist
                                  Lifetime Qt Champion
                                  wrote on 7 Aug 2014, 07:54 last edited by
                                  #20

                                  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
                                  0
                                  • K Offline
                                    K Offline
                                    kirajustice
                                    wrote on 7 Aug 2014, 09:19 last edited by
                                    #21

                                    Answer Thank you.
                                    But it also does not work.
                                    So I tried the other way attempt.
                                    I copy mingw32 / bin the dll file in the oracle_home / client / bin.
                                    I copy mingw32 / include the all file in the oracle_home / client / oci / include.
                                    I copy mingw32 / lib lib file in the oracle_home / client / oci / lib / msvc.
                                    qt 5.3 for desktop (mingw4.8 32bit) .exe
                                    -> cd c: \ qt \ 5.3 \ src \ qtbase \ src \ plugins \ sqldrivers \ oci
                                    -> qmake oci.pro
                                    -> mingw32-make
                                    In this way I
                                    lbisqloci.a
                                    qsqloci.dll
                                    qsqlocid.dll
                                    I created three files.
                                    Success!
                                    But can not open the db.

                                    QOCIDriver: unable to create environment
                                    OCIHandleAlloc segmentation fault

                                    The source is as follows:
                                    @ QSqlDatabase db;
                                    db = QSqlDatabase::addDatabase("QOCI8");
                                    db.setHostName("hostip");
                                    db.setDatabaseName("dbname");
                                    db.setUserName("userid");
                                    db.setPassword("userpw");
                                    db.setPort(1521);
                                    db.open();
                                    @
                                    Error is it because I had the wrong source code?
                                    Or so the plug incorrectly created?

                                    I would like to thank again
                                    the project be conducted .

                                    1 Reply Last reply
                                    0
                                    • S Offline
                                      S Offline
                                      SGaist
                                      Lifetime Qt Champion
                                      wrote on 7 Aug 2014, 20:26 last edited by
                                      #22

                                      No, probably the wrong dll loading

                                      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
                                      • K Offline
                                        K Offline
                                        kirajustice
                                        wrote on 8 Aug 2014, 02:32 last edited by
                                        #23

                                        Your answer is right.
                                        Plug was incorrectly made​​.
                                        I have succeeded in making the plug-in using the plug-in method of making oci provided by qt.

                                        But Oracle Tns error occurs.

                                        ORA-12154: the specified connection identifier cannot be analyzed
                                        Unable to logon

                                        This is a reference when creating a plugin
                                        This is specified when creating a plug-in to see qsql_oci.cpp

                                        @
                                        connectionString =
                                        QString::fromLatin1("(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=%1)(Port=%2))"
                                        "(CONNECT_DATA=(SERVICE_NAME=%3)))").arg(hostname).arg((port > -1 ? port : 1521)).arg(db)@

                                        Configure the TNS that the source of that I think.

                                        The TNS using sqlplus and I have successfully completed the database connection
                                        Is that different, and this part of the TNS version of DB?

                                        1 Reply Last reply
                                        0
                                        • K Offline
                                          K Offline
                                          kirajustice
                                          wrote on 8 Aug 2014, 06:57 last edited by
                                          #24

                                          I've solved.
                                          This is because you are helping.

                                          @connectionString =
                                          QString::fromLatin1("(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=%1)(PORT=%2)))"
                                          "(CONNECT_DATA=(SERVICE_NAME=%3)))").arg(hostname).arg((port > -1 ? port : 1521)).arg(db);@

                                          This was resolved by modifying the.
                                          Thanks .T_T

                                          1 Reply Last reply
                                          0

                                          14/24

                                          5 Aug 2014, 07:51

                                          • Login

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