In above example I resolve functions from dll in i.e. constructor of my main program class (i.e. void myProgramMainClass::initLib() ).
tessDllBeginPage = (TessDllBeginPage) tessLib.resolve( "TessDllBeginPage" );
tessDllBeginPage = (TessDllBeginPage) tessLib.resolve( "TessDllBeginPage" );
To copy to clipboard, switch view to plain text mode
tessDllBeginPage is of type TessDllBeginPage* and declared in private section of this class, so I can use tessDllBeginPage anywhere in my class.
Usage:
.h private section
typedef int (*TessDllBeginPageUprightBPP)(uinT32 xsize,
uinT32 ysize,
unsigned char *buf,
const char* lang,
uinT8 bpp);
TessDllBeginPageUprightBPP tessDllBeginPageUprightBPP;
typedef int (*TessDllBeginPageUprightBPP)(uinT32 xsize,
uinT32 ysize,
unsigned char *buf,
const char* lang,
uinT8 bpp);
TessDllBeginPageUprightBPP tessDllBeginPageUprightBPP;
To copy to clipboard, switch view to plain text mode
.cpp use function from dll
qDebug() << tessDllBeginPageUprightBPP( (uinT32)tmpPix.width(), (uinT32)tmpPix.height(),
tmpPix.bits(),
"eng",
(uinT8)tmpPix.depth() );
qDebug() << tessDllBeginPageUprightBPP( (uinT32)tmpPix.width(), (uinT32)tmpPix.height(),
tmpPix.bits(),
"eng",
(uinT8)tmpPix.depth() );
To copy to clipboard, switch view to plain text mode
I posted different function (I actually didn't use earlier posted) but You will get basic idea how to use it.
Or, to answer your question, example with popler dll:
.pro file
LIBS += -llibpoppler-qt4
LIBS += -llibpoppler-qt4
To copy to clipboard, switch view to plain text mode
.h private
Poppler::Document *document;
Poppler::Document *document;
To copy to clipboard, switch view to plain text mode
.cpp
Poppler::Document *pdfDoc = Poppler::Document::loadFromData( baPdf );
Poppler::Document *pdfDoc = Poppler::Document::loadFromData( baPdf );
To copy to clipboard, switch view to plain text mode
See this, that will help you:
http://doc.qt.nokia.com/qtcreator-2....libraries.html
Bookmarks