Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Cannot build project with qxt lib
Forum Updated to NodeBB v4.3 + New Features

Cannot build project with qxt lib

Scheduled Pinned Locked Moved Installation and Deployment
10 Posts 2 Posters 2.9k 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.
  • M Offline
    M Offline
    Matumba
    wrote on last edited by
    #1

    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!

    1 Reply Last reply
    0
    • jensen82J Offline
      jensen82J Offline
      jensen82
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Matumba
        wrote on last edited by
        #3

        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)@

        1 Reply Last reply
        0
        • M Offline
          M Offline
          Matumba
          wrote on last edited by
          #4

          .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

          1 Reply Last reply
          0
          • jensen82J Offline
            jensen82J Offline
            jensen82
            wrote on last edited by
            #5

            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).

            1 Reply Last reply
            0
            • jensen82J Offline
              jensen82J Offline
              jensen82
              wrote on last edited by
              #6

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

              1 Reply Last reply
              0
              • M Offline
                M Offline
                Matumba
                wrote on last edited by
                #7

                "Link":https://drive.google.com/folderview?id=0BwgodpoB3jp5OG9rMTFzb1kzSkE&usp=sharing

                1 Reply Last reply
                0
                • M Offline
                  M Offline
                  Matumba
                  wrote on last edited by
                  #8

                  @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!!!

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    Matumba
                    wrote on last edited by
                    #9

                    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)

                    1 Reply Last reply
                    0
                    • jensen82J Offline
                      jensen82J Offline
                      jensen82
                      wrote on last edited by
                      #10

                      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.

                      1 Reply Last reply
                      0

                      • Login

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