this is a really basic question. I’ve been learning C++ and thus far I have only used the standard library. I have been including things like <iostream> and with no problems. Now I want to use Apache Xerces, so I’ve installed it on my machine (a Debian system) and am following a tutorial which says I need to include:
#include <xercesc/sax2/SAX2XMLReader.hpp>
but g++ says “error: xercesc/sax2/SAX2XMLReader.hpp: No such file or directory”. Where is it looking? Do I need to give it more information?
Thanks.
Use the
--verboseoption:You can use the
-Ioption to add search directories, as explained here: http://gcc.gnu.org/onlinedocs/gcc-4.4.3/gcc/Directory-Options.html#Directory-OptionsYou can also use environment variables to change this permanently: http://gcc.gnu.org/onlinedocs/gcc-4.4.3/gcc/Environment-Variables.html#Environment-Variables
In your case, you could use
CPLUS_INCLUDE_PATH.