Where does my C++ compiler look to resolve my #includes? -


This is really a fundamental question, I am learning C ++ and so far I have only used the standard library is. I & lt; Iostream & gt; There is no other problem with anything else, now I want to use Apache axis, so I have installed it on my machine (a debian system) and following a tutorial that says that I must include:

  #include & lt; Xercesc / sax2 / SAX2XMLReader.hpp & gt;  

But G ++ says "Error: xercesc / sax2 / SAX2XMLReader.hpp: No such file or directory". Where is this looking? Do I need to give it more information?

Thank you.

code> - verbose option:

  [ ...] #include "..." search starts here: #include & lt; ... & gt; Search starts here: /usr/lib/gcc/i686-pc-linux-gnu/4.4.2/../../../../include/c++/4.4.2/ usr/lib/gcc / I686-pc-linux-gnu / 4.4.2 /../../../ contains / c ++ / 4.4.2 / i686-pc-linux-gnu / usr / lib / gcc / i686 -pc-linux -GNU / 4.4.2 /../../../../ included / C ++ / 4.4.2 / Backward / USR / local / included / USR / LIB / GCC / IE686- PC-ELIN-NNU / 4.4.2 / include /usr/lib/gcc/i686-pc-linux-gnu/4.4.2/include-fixed/ usr/ The end of the search list included. [...]  

You can use the -i option to add a search directory, as explained here:

< P> You can also use it to change the environment variable permanently:
In your case, you can use CPLUS_INCLUDE_PATH .


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -