error LNK2019: unresolved external symbol

Dear forum,

I’m trying to create a GUI (vs2008 + Qt on win7 x64) that can read line by line PDF file and detect checkboxes and get their values (checked or not). I used PDFHummus library (easy to build with CMake) and linked the library from vs2008. but I’m getting errors during the compiling

================.h file===================

#include "PDFParser.h"
#include "InputFile.h"
#include "RefCountPtr.h"
#include "PDFDictionary.h"
#include "PDFArray.h"
#include "PDFObjectCast.h"
#include "PDFInteger.h"
#include "PDFReal.h"
#include "PDFName.h"
#include "PDFIndirectObjectReference.h"
#include "PDFStreamInput.h"
#include "IByteReader.h"
#include "EStatusCode.h"


using namespace PDFHummus;

class TestMetrics : public QMainWindow
{
Q_OBJECT
public:
TestMetrics(QWidget *parent = 0, Qt::WFlags flags = 0);
~TestMetrics();
void Parse(std::string& filepath);
private:
Ui::TestMetricsClass ui;
};
===================cpp file======================
void TestMetrics::Parse(std::string &filepath)
{
//initialising the parser
PDFParser parse;
InputFile pdfFile;
pdfFile.OpenFile(filepath);
parse.StartPDFParsing(pdfFile.GetInputStream());
}

I’m getting the following error:

1>testmetrics.obj : error LNK2019: unresolved external symbol "public: virtual __thiscall PDFParser::~PDFParser(void)" (??1PDFParser@@UAE@XZ) referenced in function "public: void __thiscall TestMetrics::Parse(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)" (?Parse@TestMetrics@@QAEXAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>testmetrics.obj : error LNK2019: unresolved external symbol "public: __thiscall InputFile::~InputFile(void)" (??1InputFile@@QAE@XZ) referenced in function "public: void __thiscall TestMetrics::Parse(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)" (?Parse@TestMetrics@@QAEXAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>testmetrics.obj : error LNK2019: unresolved external symbol "public: enum PDFHummus::EStatusCode __thiscall PDFParser::StartPDFParsing(class IByteReaderWithPosition *)" (?StartPDFParsing@PDFParser@@QAE?AW4EStatusCode@PDFHummus@@PAVIByteReaderWithPosition@@@Z) referenced in function "public: void __thiscall TestMetrics::Parse(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)" (?Parse@TestMetrics@@QAEXAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>testmetrics.obj : error LNK2019: unresolved external symbol "public: class IByteReaderWithPosition * __thiscall InputFile::GetInputStream(void)" (?GetInputStream@InputFile@@QAEPAVIByteReaderWithPosition@@XZ) referenced in function "public: void __thiscall TestMetrics::Parse(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)" (?Parse@TestMetrics@@QAEXAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>testmetrics.obj : error LNK2019: unresolved external symbol "public: enum PDFHummus::EStatusCode __thiscall InputFile::OpenFile(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?OpenFile@InputFile@@QAE?AW4EStatusCode@PDFHummus@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "public: void __thiscall TestMetrics::Parse(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)" (?Parse@TestMetrics@@QAEXAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>testmetrics.obj : error LNK2019: unresolved external symbol "public: __thiscall InputFile::InputFile(void)" (??0InputFile@@QAE@XZ) referenced in function "public: void __thiscall TestMetrics::Parse(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)" (?Parse@TestMetrics@@QAEXAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>testmetrics.obj : error LNK2019: unresolved external symbol "public: __thiscall PDFParser::PDFParser(void)" (??0PDFParser@@QAE@XZ) referenced in function "public: void __thiscall TestMetrics::Parse(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &)" (?Parse@TestMetrics@@QAEXAAV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>C:\Users\massinissa.bandou\Desktop\TestMetrics\TestMetrics\Win32\Debug\TestMetrics.exe : fatal error LNK1120: 7 unresolved external

Please can anyone help me on this? I really appreciate your help!

Massi
Last edited on
Topic archived. No new replies allowed.