0

I modified XMLLite library in order to parse my XML file, then I modified it again in order to have a PPL version of XMLLite lib.
My code works so I copied/pasted .cpp and .h file in a project on VS2013 (POSTServer Project) that need to use it.

My XMLLiteReader.h starts with:

#include <ole2.h>
#include <xmllite.h>
#include <stdio.h>
#include <shlwapi.h>
#include <wchar.h>
#include <string>


/**
*  XMLReader Class
*
*  Defines the required function to parse and get data from XML File
**/
class XMLReader {
public:


    XMLReader();
    ~XMLReader();

    static BOOL  XmlFinder(WCHAR* argv, const WCHAR* log, const WCHAR*     Pass);
    /**
    *  Get the data from the XML Files
    *
    *  Returns Boolean if find it
    */

    static  struct data_t
    {
        std::wstring NumProcess;
        std::wstring Log;
        std::wstring Pass;
        std::wstring Mail;
        std::wstring memLimit;
        std::wstring CPULimit;

    }data;


};

And my XMLLiteReader.cpp starts with:

#include "stdafx.h"
#include "XmlLiteReader.h"

XMLReader::XMLReader()
{
}

XMLReader::~XMLReader()
{
}

 //static BOOL XMLReader::XmlFinder(WCHAR* argv, const WCHAR* log, const     WCHAR* Pass);
 XMLReader::data_t XMLReader::data;

BOOL XMLReader::XmlFinder(WCHAR* argv, const WCHAR* Log, const WCHAR* Pass)
//BOOL  XmlFinder(WCHAR* argv, const WCHAR* log, const WCHAR* Pass)
{......
}

But now I have 3 LNK2019 errors like this:

error LNK2019: unresolved external symbol _CreateXmlReader@12 referenced in function "public: static int __cdecl XMLReader::XmlFinder(wchar_t *,wchar_t const *,wchar_t const *)" (?XmlFinder@XMLReader@@SAHPA_WPB_W1@Z)    C:\Users\My_Folder\Documents\Visual Studio 2013\Projects\TaskListExample\POSTServer\XmlLiteReader.obj   POSTServer

I read all threads about LNK2019 on stackoverflow but didn't find a solution. Suggestions?

EDIT: I forget to add xmllite.lib in Properties -> Link -> Input. CreateXmlReader is declared on xmllite.h.

valiano
  • 16,433
  • 7
  • 64
  • 79
kenhero
  • 95
  • 2
  • 11

0 Answers0