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"
#-------------------------------------------------
#
# 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"
To copy to clipboard, switch view to plain text mode
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
) : 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;
}
#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;
}
To copy to clipboard, switch view to plain text mode
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
Bookmarks