PDA

View Full Version : Error in NCReport for Qt 5.1.1 minGW



advseo32
17th September 2013, 19:16
after a long wait NCreport release a compatible version for Qt 5.1.1 minGW

every thing work perfectyl but after implementation my programme can’t start

her is my code .pro file


#-------------------------------------------------
#
# Project created by QtCreator 2013-09-17T18:17:24
#
#-------------------------------------------------

QT += core gui sql xml printsupport

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = testncreport
TEMPLATE = app

INCLUDEPATH += "E:\apprendreQt\gestionstock6\includes\include"

SOURCES += main.cpp\
mainwindow.cpp

HEADERS += mainwindow.h

FORMS += mainwindow.ui


LIBS += "-LE:\apprendreQt\gestionstock6\includes\lib -lNCReport2"

her is the mainwindow.cpp


#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "ncreport.h"
#include "ncreportpreviewoutput.h"
#include "ncreportoutput.h"
#include "ncreportpreviewwindow.h"

MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow)
{
ui->setupUi(this);

NCReport *report = new NCReport(this);
report->reset(true);
report->setReportFile("E:\apprendreQt\gestionstock6\includes\reports\test .xml");
report->runReportToPrinter();

}

MainWindow::~MainWindow()
{
delete ui;
}

after compiling i get this error


C:\test\testncreport\mainwindow.cpp:14: error: undefined reference to `_imp___ZN8NCReportC1EP7QObject'
C:\test\testncreport\mainwindow.cpp:15: error: undefined reference to `_imp___ZN8NCReport5resetEb'
C:\test\testncreport\mainwindow.cpp:15: error: undefined reference to `_imp___ZN8NCReport5resetEb'
C:\test\testncreport\mainwindow.cpp:17: error: undefined reference to `_imp___ZN8NCReport18runReportToPrinterEibP7QWidge tRK7QString'
collect2.exe:-1: error: error: ld returned 1 exit status

ChrisW67
18th September 2013, 05:57
Read the answer (http://qt-project.org/forums/viewthread/32647/#143057) in your thread on another forum.