LimeReport Forum

General Category | Основное => Discussion | Обсуждение => Topic started by: pcuevas on April 26, 2017, 05:10:45 AM

Title: Including LimeReport in QT Project
Post by: pcuevas on April 26, 2017, 05:10:45 AM
Hi,

I have a problem including the DLL and .h.

I add this lines to my .pro file:
INCLUDEPATH += "C:\LimeReport\include"
LIBS += "C:\LimeReport\lib\limereport.dll"

In my class I add:
#include <LimeReport>


When I compile I got this error:
C:\LimeReport\include/lrpreviewreportwidget.h:16:45: error: expected initializer before ':' token
 class LIMEREPORT_EXPORT PreviewReportWidget : public QWidget

I have not idea what´s going on.

Someone can help me.

Many thanks
Pablo
Title: Re: Including LimeReport in QT Project
Post by: Arin Alex on April 26, 2017, 09:45:55 AM
Hi

Instead
Quote
LIBS += "C:\LimeReport\lib\limereport.dll"
should be LIBS += "C:\LimeReport\lib\ -llimereport
Title: Re: Including LimeReport in QT Project
Post by: pcuevas on April 26, 2017, 11:34:16 PM
Sorry Arin bother you again, I cannot connect with Lime  :'( :'( :'(



I want to tell you that I'm not using the source program of Lime.
I'm directly using the binaries.

Anyway I show you again what I am doing:
- PRO File, those lines were added
LIBS += -L/LimeReport/lib/ -llimereport
INCLUDEPATH += /LimeReport/include

- Mainwindow.h
#include "LimeReport"

To create I followed same way that you did  it in demo_r1
- Mainwindow.h
LimeReport::ReportEngine *report;

- Mainwindow.cpp
report = new LimeReport::ReportEngine(this);

And the error that I got is:
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

Any ideas?


Title: Re: Including LimeReport in QT Project
Post by: pcuevas on April 27, 2017, 02:41:09 AM
Hi Arin,

Once I recompile the source code of LimeReport in my Qt and I got the DLL and the headers.

Those problems disappeared.

So we can close this topic.

Thanks
Pablo