Hi David,
as far as I know, using #include "..." means "include this file using
the given path relative to the folder where the cpp file is located",
while using #include <...> means "do like before, and if you don't find
it, repeat the process with each folder specified in the INCLUDE list".
It is not reserved for system headers, and Xerces-C doesn't violate any
rule.
Javier must add the proper directory to the project settings (Project |
Properties | C/C++ | General | Additional Include Directories) or
globally (Tools | Options | Projects and Solutions | VC++ Directories ->
Include Files and Library files)
Alberto
David Bertoni wrote:
Javier Gálvez Guerrero wrote:
Hi everyone,
When I try to compile a C++ class with its includes in the .h header
like
this:
#include <xercesc/dom/DOM.hpp>
#include <xercesc/dom/DOMImplementation.hpp>
#include <xercesc/dom/DOMImplementationLS.hpp>
#include <xercesc/dom/DOMWriter.hpp>
#include <xercesc/util/PlatformUtils.hpp>
The compiler fails saying there's no such file or directory. If I
change <>
for "" the compiling error dissapears for these included files, but
appear
for those included in them (for instance, DOMAttr.hpp). Actually, I
think
that something is going wrong because <> should not be changed, but I am
unable to guess what I am doing wrong. Obviously, the xerces folder
is where
it must be (so that the errors dissapear when <> are changed by "").
Can anybody help me, please?
Note that all files should be included using "" and not <>. Standard
C++ reserves <> for system headers, and Xerces-C violates that.
This is likely happening because you built the binaries but did not
build an official distribution, or you have the include path messed
up. Please supply more information about your compiler and
development environment.
Dave