Problem itegrating Ncreport to my application
-
after placing NCReport2.dll with my .exe file , i got the same error
“Le programme s’est terminé subitement.”
i think is “ The program ended suddenly.” in english
this is .pro file
@#-------------------------------------------------
Project created by QtCreator 2013-08-14T17:44:33
#-------------------------------------------------
QT += core gui sql
greaterThan(QT_MAJOR_VERSION, 4){
QT += widgets printsupport
DEFINES += HAVE_QT5
}TARGET = gestionstock6
TEMPLATE = appSOURCES += main.cpp
mainwindow.cpp
produit.cpp
customqtablewidget.cpp
customdelegatecombobox.cpp
customproxy.cpp
client.cpp
bondelivraison.cpp
chercherproduit.cpp
chercherclientproduitwidget.cpp
fournisseur.cpp
chercherfournisseur.cpp
vente.cppHEADERS += mainwindow.h
customqtablewidget.h
customdelegatecombobox.h
customproxy.h
client.h
bondelivraison.h
chercherproduit.h
produit.h
produit.h
produit.h
chercherclientproduitwidget.h
fournisseur.h
chercherfournisseur.h
vente.hFORMS += mainwindow.ui
produit.ui
client.ui
bondelivraison.ui
chercherproduit.ui
chercherclientproduitwidget.ui
fournisseur.ui
chercherfournisseur.ui
vente.uiINCLUDEPATH += "E:/apprendreQt/gestionstock6/includes/include"
LIBS += -L"E:/apprendreQt/gestionstock6/includes/lib"-lNCReport2
@ -
Then start your program in debug mode with a debugger.
This error message just says that the application died not why.
-
Then check that all dlls you might be using can be found at runtime
-
Now i getting this error
@E:\apprendreQt\gestionstock6\vente.cpp:25: erreur : undefined reference to `_imp___ZN8NCReportC1EP7QObject'
E:\apprendreQt\build-gestionstock6-Desktop_Qt_5_1_0_MinGW_32bit-Debug\debug\vente.o:-1: In function `ZN5Vente23on_pushButton_4_clickedEv':
E:\apprendreQt\gestionstock6\vente.cpp:222: erreur : undefined reference to `_imp___ZN8NCReport5resetEb'
E:\apprendreQt\gestionstock6\vente.cpp:223: erreur : undefined reference to `_imp___ZN8NCReport13setReportFileERK7QString'
E:\apprendreQt\gestionstock6\vente.cpp:224: erreur : undefined reference to `_imp___ZN8NCReport20runReportToQtPreviewEv'@
this is my implementation of NCreport
@void Vente::on_pushButton_4_clicked()
{
m_report->reset(true);
m_report->setReportFile("E:/apprendreQt/build-gestionstock6-Desktop_Qt_5_1_0_MinGW_32bit-Debug/reports/abdeu.xml");
m_report->runReportToQtPreview();}@
-
is NCReport also built with mingw ?
-
Then there's your problem, you are trying to link a library built with VisualStudio while using mingw. The name of the installers from the download section of NCReport is pretty clear.
-
yeah i have downloaded all versions
@application/octet-stream NCReport2.10.0_Windows_x86_VS2010_Qt5.1.0_Evaluation.exe (18.0 MB)
application/octet-stream NCReport2.10.0_Windows_x86_VS2010_Qt4.8.5_Evaluation.exe (10.6 MB)
application/octet-stream NCReport2.10.0_Windows_x86_MinGW_Qt4.8.5_Evaluation.exe (14.1 MB)@
i have used the last one but not working for me also
i'm using Qt 5.1.0
plz help me i'm completely lost
-
You can't use a library built with Qt 4 if you are using Qt 5 and also AFAIK, you can't link a c++ library from visual studio using mingw. So you have two options:
Change your Qt version and compiler for Visual Studio
Ask the NCReport developer to release a Qt 5 mingw version
-
You can also just install Qt 4 (unless your application use Qt 5 specific elements)
-
What specific part of Qt 5 are you using that is not in Qt 4 ?
As I said, you can also contact the NCReport developer to ask if they plan to deliver a MinGW Qt 5 release.
-
And what forbids you to ask them for an evaluation version with MinGW ? Worst case the answer would be no
-
-
No I don't.
You can create the report yourself using i.e. HTML or the QTextDocument framework.
-
the support send me this email @Hi,
Qt5.1.1/MinGW is planned to upload soon.
regards,
We hope this response has sufficiently answered your questions.
If not, please do not send another email. Instead, reply to this email
or login to your account for a complete archive of all your support
request and responses.@so i must use another way , instead of waiting them to upload a compatible library