#include <QtKOAuth> not being recognized



  • Using Windows 7 64-bit.

    I compiled the kqoauth library using Qt Creator 5.1.
    I added the library by right-clicking on my project.
    When I run qmake and then build in the IDE, I get:

    error: C1083: Cannot open include file: 'QtKOAuth': No such file or directory

    How do I fix it?

    Here is what the .pro file looks like:

    @#-------------------------------------------------

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

    SQ added QT += network, CONFIG += kqoauth, QT += sql

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

    QT += sql

    QT += core gui

    QT += network

    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    CONFIG += kqoauth

    LIBS += -lC:/Users/RoboSQ/Documents/Qt Projects/kQOAuth-master/build-kqoauth-Desktop_Qt_5_1_0_MSVC2012_OpenGL_64bit-Debug/lib/kqoauthd0.lib

    TARGET = TradeBot_5
    TEMPLATE = app

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

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

    FORMS +=
    mainwindow.ui

    win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../kQOAuth-master/build-kqoauth-Desktop_Qt_5_1_0_MSVC2012_OpenGL_64bit-Debug/lib/ -lkqoauthd0

    else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../kQOAuth-master/build-kqoauth-Desktop_Qt_5_1_0_MSVC2012_OpenGL_64bit-Debug/lib/ -lkqoauthd0d

    INCLUDEPATH += $$PWD/../kQOAuth-master/build-kqoauth-Desktop_Qt_5_1_0_MSVC2012_OpenGL_64bit-Debug
    DEPENDPATH += $$PWD/../kQOAuth-master/build-kqoauth-Desktop_Qt_5_1_0_MSVC2012_OpenGL_64bit-Debug@


  • Moderators

    Did you check that you have an include "QtKOAuth"?
    If yes, it seems to be an include path problem, otherwise it is more likely a wrong name of the include you are referring to in your source.



  • My include #include <QtKOAuth> is correct.

    One thing, there is something odd about being forced to select .lib in the "Add Library" wizard (no other options). I'm working with a dynamic library (.dll) in windows, not a static .lib.

    I'm truly stumped.

    Hopefully someone out there really knows about this, otherwise I'm permanently stuck.



  • I changed the .pro file and now have an:
    error: C1083: Cannot open include file: 'kqoauthrequest.h': No such file or directory

    This kqoauthrequest.h is the first line of include statements "inside" the QtKOAuth file in the Include folder.

    Here is what my .pro file looks like now:

    @#-------------------------------------------------

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

    SQ added QT += network, CONFIG += kqoauth, QT += sql

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

    QT += sql

    QT += core gui

    QT += network

    greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

    #CONFIG += kqoauth

    LIBS += -lC:/Users/RoboSQ/Documents/Qt Projects/kQOAuth-master/build-kqoauth-Desktop_Qt_5_1_0_MSVC2012_OpenGL_64bit-Debug/lib/kqoauthd0.lib

    TARGET = TradeBot_5
    TEMPLATE = app

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

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

    FORMS +=
    mainwindow.ui

    win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../kQOAuth-master/lib/ -lkqoauthd0
    #else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../kQOAuth-master/lib/ -lkqoauthd0d

    INCLUDEPATH += $$PWD/../kQOAuth-master/include/
    DEPENDPATH += $$PWD/../kQOAuth-master/include/
    @


  • Lifetime Qt Champion

    Hi,

    Are you sure that

    @$$PWD/../kQOAuth-master/include@

    is pointing to the right path ?

    As a side note, on windows, even when working with dlls, you link to a lib file, this one contains just the information needed about the library to link against.


Log in to reply
 

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