STEP-BY-STEP instructions to use the kQOAuth library under windows (7) using Qt Creator



  • This is intended to prevent all the newbies from a world of pain.

    These STEP-BY-STEP instructions represent the easiest method to get the kQOAuth library to work under windows:

    1- In a web browser goto https://github.com/kypeli/kQOAuth
    2- Click on Download Zip button
    3- In Downloads folder right click on kQOAuth-master file and extract files to your development folder
    4- In Qt Creator, File>Open File or Project...
    5- Select the Qt Project file in the kQOAuth-master folder that resides in your development folder
    6- In the Projects tree view in Qt Creator:
    6.1- Right click on the kqoauth project >set as active project
    6.2- Right click on the kqoauth project > Run qmake
    6.3- Right click on the kqoauth project > Build (you may encounter a few warnings concerning "test" files,
    but you can ignore them)
    6.4- Right click on your main project (that will use kqoauth library) >set as active project
    6.5- Double-click on main project's .pro file to edit it
    6.6- Use the following .pro example to modify your .pro accordingly:
    @#-------------------------------------------------

    Project created by QtCreator 2013-08-10T22:14:26

    #-------------------------------------------------

    QT += sql

    QT += core gui

    QT += network

    CONFIG += kqoauth

    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    TARGET = TradeBot_5
    TEMPLATE = app

    SOURCES += main.cpp
    mainwindow.cpp
    databasemanager.cpp
    tkstreamer.cpp

    HEADERS += mainwindow.h
    databasemanager.h
    tkstreamer.h

    FORMS +=
    mainwindow.ui

    windows:
    {
    INCLUDEPATH += "c:/Users/RoboSQ/Documents/Qt Projects/kQOAuth-master/include"
    INCLUDEPATH += "c:/Users/RoboSQ/Documents/Qt Projects/kQOAuth-master/src"
    LIBS += -L"c:/Users/RoboSQ/Documents/Qt Projects/kQOAuth-master/lib" -lkqoauthd0
    }@

    7- Notice the INCLUDEPATHS and LIBS in the windows block (this block is here because later, blocks for platforms other than windows may be necessary); their are two important characteristics:
    7.1- The slashes are forward slashes, not backslashes like normal windows path delimiters
    7.2- The paths are surrounded in double quotes only because there is a space in one of the folder names
    along the path, otherwise the quotes are not needed.
    8- In a windows explorer navigate to kQOAuth-master/lib and copy the kqoauthd0.lib file (listed as Object
    File Library) and the kqoauthd0.dll file (listed as Application Extension)
    9- Paste both files into your main project directory.
    10- In your .cpp file that uses the kQOAuth library type in #include <QtKOAuth>
    11- In the Projects tree view in Qt Creator:
    11.1- Ensure you main project is the active project as done above in step 6
    11.2- Right click on the main project > clean
    11.3- Right click on the main project > Run qmake
    11.4- Right click on the main project > Build
    12- All should build successfully.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.