|
-
November 6th, 2006, 07:15 AM
#1
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 <>??
-
November 6th, 2006, 08:01 AM
#2
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 <>
 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 <>??
-
November 6th, 2006, 08:23 AM
#3
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.
-
November 6th, 2006, 12:04 PM
#4
Re: Error that it cannot find the .hpp
Both forms will search your include path for the file in question. The difference is:
 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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|