Error that it cannot find the .hpp
Hi,
I have this section of code (reduced select section):
#include <FileCtrl.hpp>
#include "Pasunit.hpp"
#include <IniFiles.hpp>
#include "Registry.hpp"
#include "TCPBase.h"
#include "Main.h"
one of the files causing me grief is pasunit.hpp. My real question is though why is that in "" and the others in <>??
Re: Error that it cannot find the .hpp
I think with " ", compiler searches in your local directory and with <> does in your inlcude_list of your makefile.
Usually, includes from the directory of the program/library you are programming uses " ", and the others (standard library, and other libraries) use <>
Quote:
Originally Posted by eenu
Hi,
I have this section of code (reduced select section):
#include <FileCtrl.hpp>
#include "Pasunit.hpp"
#include <IniFiles.hpp>
#include "Registry.hpp"
#include "TCPBase.h"
#include "Main.h"
one of the files causing me grief is pasunit.hpp. My real question is though why is that in "" and the others in <>??
Re: Error that it cannot find the .hpp
typically, the #include "hdr_filename" can be used to include headers you have composed yourself and are located in the current directory.
#include <hdr_filename> will be used to include headers that are provided in a standard place like for standard library for example.
The absolute path does not need to be specified.
Re: Error that it cannot find the .hpp
Both forms will search your include path for the file in question. The difference is:
Quote:
Originally Posted by MSDN
Quoted form: This form instructs the preprocessor to look for include files in the same directory of the file that contains the #include statement, and then in the directories of any files that include (#include) that file. The preprocessor then searches along the path specified by the /I compiler option, then along paths specified by the INCLUDE environment variable.
Angle form: This form instructs the preprocessor to search for include files first along the path specified by the /I compiler option, then, when compiling from the command line, along the path specified by the INCLUDE environment variable.
http://msdn.microsoft.com/library/de..._Directive.asp
Viggy