Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. ZN10MainWindowC2EP7QWidget
Forum Updated to NodeBB v4.3 + New Features

ZN10MainWindowC2EP7QWidget

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 2 Posters 2.5k 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.
  • PabloArgP Offline
    PabloArgP Offline
    PabloArg
    wrote on last edited by
    #1

    Any Ideas what is that?

    I was compiling my app, and I got that
    debug/mainwindow.o: In function `ZN10MainWindowC2EP7QWidget':

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      What does your MainWindow look like ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • PabloArgP Offline
        PabloArgP Offline
        PabloArg
        wrote on last edited by
        #3

        MAINWINDOW.CPP

        #include "mainwindow.h"
        #include "ui_mainwindow.h"

        MainWindow::MainWindow(QWidget *parent) :
        QMainWindow(parent),
        ui(new Ui::MainWindow)
        {
        ui->setupUi(this);
        report = new LimeReport::ReportEngine(this);
        }

        MainWindow::~MainWindow()
        {
        delete ui;
        }
        MIANWINDOW.H

        #ifndef MAINWINDOW_H
        #define MAINWINDOW_H

        #include <QMainWindow>
        #include "lrreportengine.h"

        namespace Ui {
        class MainWindow;
        }

        class MainWindow : public QMainWindow
        {
        Q_OBJECT

        public:
        explicit MainWindow(QWidget *parent = 0);
        ~MainWindow();

        private:
        Ui::MainWindow *ui;
        LimeReport::ReportEngine *report;

        };

        #endif // MAINWINDOW_H

        PRO File

        QT += core gui uitools script xml sql printsupport

        greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

        TARGET = UsandoLimeReport
        TEMPLATE = app

        DEFINES += QT_DEPRECATED_WARNINGS

        SOURCES += main.cpp
        mainwindow.cpp

        HEADERS += mainwindow.h

        FORMS += mainwindow.ui

        LIBS += -L"/LimeReport/lib" -llimereport
        INCLUDEPATH += "/LimeReport/include"

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          Looks good.

          Which platform are you building on ?

          Also, did you re-run qmake after adding LimeReport ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • PabloArgP Offline
            PabloArgP Offline
            PabloArg
            wrote on last edited by
            #5

            I am on Windows 10 64bits, QT creator 4.2.1, QT 5.8 MinGW.

            But is quite curious, because I take the demos of LimeReport and compile perfectly. Okay, that project is compiling all sources.

            In my little application I'm using LimeReport binaries, using their libraries and headers.
            Probably there some error, I don´t know

            1 Reply Last reply
            0
            • PabloArgP Offline
              PabloArgP Offline
              PabloArg
              wrote on last edited by
              #6

              This is the complete error message:
              debug/mainwindow.o: In function ZN10MainWindowC2EP7QWidget': C:\Users\pablo\Documents\Desarrollos\QTCreator\build-UsandoLimeReport-Desktop_Qt_5_8_0_MinGW_32bit-Debug/../UsandoLimeReport/mainwindow.cpp:9: undefined reference to LimeReport::ReportEngine::ReportEngine(QObject*)'
              collect2.exe: error: ld returned 1 exit status

              1 Reply Last reply
              0
              • PabloArgP Offline
                PabloArgP Offline
                PabloArg
                wrote on last edited by
                #7

                Hi SGaist,

                As you said, I recompiled the source code of LimeReport on the platform I'm working on, I got the dlls and headers and that problem had disappeared

                Many thanks, to open my eyes.

                Pablo

                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