JeyPeyy
June 27th, 2012, 10:34 PM
I'm trying to do a program that will read the visual pdf's we get from work with our schedule on it, and give a file in the icalendar or csv format (or some other format if my friends asks for it) so we can sync it with our calendars (eg google calendar). I've looked for libraries that parse pdf's and the best one so far seems to be PoDoFo (http://podofo.sourceforge.net/index.html). So I installed the libpodofo-dev package from the default repositories.
I have podofo/base/PdfParser.h and podofo/base/PdfVecObjects.h included, but it seems like the linker can't find the object. I get these error messages:
main.cpp:(.text+0xaf): undefined reference to PoDoFo::PdfVecObjects::PdfVecObjects()'
main.cpp:(.text+0xc7): undefined reference to `PoDoFo::PdfParser::PdfParser(PoDoFo::PdfVecObject s*)'
collect2: ld returned 1 exit status
Here's (parts of) my code:
#include <QFileDialog>
#include <podofo/base/PdfParser.h>
#include <podofo/base/PdfVecObjects.h>
[...]
void readPDF(QFile file)
{
PoDoFo::PdfVecObjects *pdfVecObject = new typename PoDoFo::PdfVecObjects::PdfVecObjects;
PoDoFo::PdfParser *parser = new typename PoDoFo::PdfParser::PdfParser(pdfVecObject);
[...]
}
I'm pretty sure the rest of the code has nothing to do with it.
I use Qt Creator and I haven't changed the compiler flags
I have podofo/base/PdfParser.h and podofo/base/PdfVecObjects.h included, but it seems like the linker can't find the object. I get these error messages:
main.cpp:(.text+0xaf): undefined reference to PoDoFo::PdfVecObjects::PdfVecObjects()'
main.cpp:(.text+0xc7): undefined reference to `PoDoFo::PdfParser::PdfParser(PoDoFo::PdfVecObject s*)'
collect2: ld returned 1 exit status
Here's (parts of) my code:
#include <QFileDialog>
#include <podofo/base/PdfParser.h>
#include <podofo/base/PdfVecObjects.h>
[...]
void readPDF(QFile file)
{
PoDoFo::PdfVecObjects *pdfVecObject = new typename PoDoFo::PdfVecObjects::PdfVecObjects;
PoDoFo::PdfParser *parser = new typename PoDoFo::PdfParser::PdfParser(pdfVecObject);
[...]
}
I'm pretty sure the rest of the code has nothing to do with it.
I use Qt Creator and I haven't changed the compiler flags