Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Unable to build OCI plugin



  • I followed as per documentation :

    C:\Qt\5.15.2\msvc2019_64\plugins\sqldrivers>qmake -- OCI_INCDIR=D:\OracleHome\dbhomeXE\oci\include OCI_LIBDIR=D:\OracleHome\dbhomeXE\oci\lib\msvc
    

    and the output is :

    Usage: qmake [mode] [options] [files]
    
    QMake has two modes, one mode for generating project files based on
    some heuristics, and the other for generating makefiles. Normally you
    shouldn't need to specify a mode, as makefile generation is the default
    mode for qmake, but you may use this to test qmake on an existing project
    
    Mode:
      -project       Put qmake into project file generation mode
                     In this mode qmake interprets [files] as files to
                     be added to the .pro file. By default, all files with
                     known source extensions are added.
                     Note: The created .pro file probably will
                     need to be edited. For example add the QT variable to
                     specify what modules are required.
      -makefile      Put qmake into makefile generation mode (default)
                     In this mode qmake interprets files as project files to
                     be processed, if skipped qmake will try to find a project
                     file in your current working directory
    
    Warnings Options:
      -Wnone         Turn off all warnings; specific ones may be re-enabled by
                     later -W options
      -Wall          Turn on all warnings
      -Wparser       Turn on parser warnings
      -Wlogic        Turn on logic warnings (on by default)
      -Wdeprecated   Turn on deprecation warnings (on by default)
    
    Options:
       * You can place any variable assignment in options and it will be *
       * processed as if it was in [files]. These assignments will be    *
       * processed before [files] by default.                            *
      -o file        Write output to file
      -d             Increase debug level
      -t templ       Overrides TEMPLATE as templ
      -tp prefix     Overrides TEMPLATE so that prefix is prefixed into the value
      -help          This help
      -v             Version information
      -early         All subsequent variable assignments will be
                     parsed right before default_pre.prf
      -before        All subsequent variable assignments will be
                     parsed right before [files] (the default)
      -after         All subsequent variable assignments will be
                     parsed after [files]
      -late          All subsequent variable assignments will be
                     parsed right after default_post.prf
      -norecursive   Don't do a recursive search
      -recursive     Do a recursive search
      -set <prop> <value> Set persistent property
      -unset <prop>  Unset persistent property
      -query <prop>  Query persistent property. Show all if <prop> is empty.
      -qtconf file   Use file instead of looking for qt.conf
      -cache file    Use file as cache           [makefile mode only]
      -spec spec     Use spec as QMAKESPEC       [makefile mode only]
      -nocache       Don't use a cache file      [makefile mode only]
      -nodepend      Don't generate dependencies [makefile mode only]
      -nomoc         Don't generate moc targets  [makefile mode only]
      -nopwd         Don't look for files in pwd [project mode only]
    

    Now IDK what parameters I'm missing , when i tried to build for mysql it showed the same output, but anyhow I managed to to work with mysql (I didn't actually build, I copied them into source from somewhere I downloaded).

    So what am I doing wrong?


  • Lifetime Qt Champion

    @vantablack Try to specify the pro file explicetly.
    Also, you should not build inside source tree. It is better to create a build folder and call qmake and build there:

    mkdir build_oci
    cd build_oci
    qmake C:\Qt\5.15.2\msvc2019_64\plugins\sqldrivers\NAMEOFPROFILE.pro OCI_INCDIR=D:\OracleHome\dbhomeXE\oci\include OCI_LIBDIR=D:\OracleHome\dbhomeXE\oci\lib\msvc
    make
    make install
    


  • @jsulm
    I made oci.pro in /sqldrivers and executed :

    qmake C:\Qt\5.15.2\msvc2019_64\plugins\sqldrivers\oci.pro OCI_INCDIR=D:\OracleHome\dbhomeXE\oci\include OCI_LIBDIR=D:\OracleHome\dbhomeXE\oci\lib\msvc
    

    It gave me :

    Project ERROR: Cannot run compiler 'cl'. Output:
    ===================
    ===================
    Maybe you forgot to setup the environment?
    

  • Lifetime Qt Champion

    @vantablack If you want to use Microsoft compiler you have to start their developer console (not sure how exactly it is called, should be in Visual Studio entry in start menu). Or you use the one from your Qt installation. This is needed to prepare the environment before building. See https://doc.qt.io/qt-5/windows-building.html for more details.


  • Lifetime Qt Champion

    Hi,

    Additionally to @jsulm, you first need download the Qt sources. Currently you are running that in your Qt installation.


Log in to reply