Adding the dependency will work for linking the library, but in order to tell the compiler where to look for the headers you need to add the xerces-c-src_2_8_0\src folder to the Additional Include Directories property of the C/C++ -> General option of the project.

Alberto

Attila wrote:
Hi,

I have a solution that includes my own console win32 app

ValidateXmlWithXsd.cpp:

#include <xercesc/util/PlatformUtils.hpp>

#include <xercesc/dom/DOM.hpp>

#include <xercesc/dom/DOMImplementation.hpp>

#include <xercesc/dom/DOMImplementationLS.hpp>

#include <xercesc/dom/DOMWriter.hpp>



#include <xercesc/framework/StdOutFormatTarget.hpp>

#include <xercesc/framework/LocalFileFormatTarget.hpp>

#include <xercesc/parsers/XercesDOMParser.hpp>

#include <xercesc/util/XMLUni.hpp>


#include <xercesc/util/OutOfMemoryException.hpp>



#include <string.h>

#include <stdlib.h>



#include "stdafx.h"



XERCES_CPP_NAMESPACE_USE



int _tmain(int argc, _TCHAR* argv[])

{



      try {

            XMLPlatformUtils::Initialize();

        }

        catch (const XMLException& toCatch) {

            // Do your failure processing here

            return 1;

        }



      return 0;

}
Then I include the Xerces-c_2_8 win32 VS 8 (2005) XercesLib project (
xerces-c-src_2_8_0\Projects\Win32\VC8\xerces-all\XercesLib)
into my solution.
However when I try to build I get the error:

1>c:\path\to\validatexmlwithxsd\validatexmlwithxsd.cpp(6) : fatal error
C1083: Cannot open include file: 'xercesc/util/PlatformUtils.hpp': No such
file or directory
I have my project dependancy set to depend on XercesLib.

Thanks for your help!



Reply via email to