Cannot build project with qxt lib



  • Hello!
    I'm tried to install qxt lib like "this":http://qt-project.org/wiki/LibQxt_in_QtCreator
    but, when i tried include 1 lib to my project, namely QxtCsvModel.
    I had some troubles.
    MinGW32 cannot compile my project.
    From QxtCsvModel i tried to use to start only
    @QxtCsvModel *m_pCsvModel = new QxtCsvModel(this);@
    but I had some link errors.

    Later I tried to install qxt with another method:

    @configure -static -release
    mingw32-make -j3
    mingw32-make install -j3@

    @configure -debug
    mingw32-make -j3
    mingw32-make install -j3@

    and wrote in my .pro file this:
    @CONFIG += qxt
    QXT += core gu@
    QT didn't see libs from qxt.

    Help me please!



  • And the files (.lib, .dll) are there? Did you set the path to lib/dll/include?



  • Yep, I've all .lib & .dll there. I set the path only to bin directory.
    I tried include lib and dll with help of this code:
    @win32:CONFIG(release, debug|release): LIBS += -LD:/Developmentt/Qt/libqxt/lib/ -lqxtcore
    else:win32:CONFIG(debug, debug|release): LIBS += -LD:/Developmentt/Qt/libqxt/lib/ -lqxtcore

    INCLUDEPATH += D:/Developmentt/Qt/libqxt/src/core
    DEPENDPATH += D:/Developmentt/Qt/libqxt/src/core@

    or with help of this code:
    @CONFIG += qxt
    QXT += core gui
    QXT_DIR = D:/Developmentt/Qt/libqxt
    LIBS += -L$${QXT_DIR}/lib
    INCLUDEPATH += -L$${QXT_DIR}/include
    DEPENDPATH += -L$${QXT_DIR}/include@
    P.S: 1th variant it's without mingw32-make install -j3 (where 3 it's count core +1)@



  • .pro:
    @CONFIG += QXT
    QXT += core gui
    QT += core gui

    greaterThan(QT_MAJOR_VERSION, 4){
    QT += widgets
    QXT += widgets
    }

    TARGET = CSVReader
    TEMPLATE = app

    SOURCES += main.cpp
    mainwindow.cpp
    csvreader.cpp

    HEADERS += mainwindow.h
    csvreader.h

    QXT_DIR = D:\Development\Qt\Qxt0.7.0
    win32:CONFIG(release, debug|release): LIBS += -L$${QXT_DIR}\lib\ -lqxtcore
    else:win32:CONFIG(debug, debug|release): LIBS += -L$${QXT_DIR}\lib\ -lqxtcore

    INCLUDEPATH += $${QXT_DIR}\include\QxtCore
    DEPENDPATH += $${QXT_DIR}\include\QxtCore@

    .h:
    @#ifndef CSVREADER_H
    #define CSVREADER_H

    #include <QWidget>
    #include <QxtCsvModel>

    class QTableView;

    class CSVReader : public QWidget
    {
    Q_OBJECT
    public:
    explicit CSVReader(QWidget *parent = 0);

    signals:

    public slots:
    void openCsv(const QString &filename);
    void saveCsv(const QString &filename);
    private:
    QxtCsvModel *m_pCsvModel;
    QTableView *m_ptblCsv;
    };

    #endif // CSVREADER_H
    @

    .cpp:
    @#include "csvreader.h"

    #include <QTableView>

    CSVReader::CSVReader(QWidget *parent) :
    QWidget(parent)
    {
    m_pCsvModel = new QxtCsvModel(this);
    m_ptblCsv = new QTableView(this);
    }

    void CSVReader::openCsv(const QString &filename)
    {
    m_pCsvModel->setSource(filename);
    }

    void CSVReader::saveCsv(const QString &filename)
    {
    m_pCsvModel->toCSV(filename);
    }
    @

    "error list:":http://oi60.tinypic.com/16az47t.jpg



  • Hi!

    The errors say that the compiler misses the implementation. Are you sure you set the right path to the lib file and the lib exists? Did you compile qxt in debug-mode and in release-mode. Maybe your linking to the wrong lib (debug, release).



  • Or post the project files so i can download them and test.





  • @win32:CONFIG(release, debug|release): LIBS += -LD:\Development\Qt\Qxt0.7.0\lib -lqxtcored
    else:win32:CONFIG(debug, debug|release): LIBS += -LD:\Development\Qt\Qxt0.7.0\bin -lqxtcored@
    It's WORK!!!



  • Ohhh. I had again trouble. But now with static linking. I've already qt5 static (it's working without qxt lib), but now, when I wanted link static project, application "cried" that it's wanted some my dll (qt and qxt)



  • If you start it via the explorer or debugging with QtCreator? If you start it from the explorer or command prompt the path to the qt-dlls is not set. You can set the path or copy the dll-files you need to the same directory where your exe-file is located.


Log in to reply
 

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