Solved ZN10MainWindowC2EP7QWidget
-
Any Ideas what is that?
I was compiling my app, and I got that
debug/mainwindow.o: In function `ZN10MainWindowC2EP7QWidget': -
Hi,
What does your MainWindow look like ?
-
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_OBJECTpublic:
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 = appDEFINES += QT_DEPRECATED_WARNINGS
SOURCES += main.cpp
mainwindow.cppHEADERS += mainwindow.h
FORMS += mainwindow.ui
LIBS += -L"/LimeReport/lib" -llimereport
INCLUDEPATH += "/LimeReport/include" -
Looks good.
Which platform are you building on ?
Also, did you re-run qmake after adding LimeReport ?
-
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 -
This is the complete error message:
debug/mainwindow.o: In functionZN10MainWindowC2EP7QWidget': 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 -
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