What is the difference between importing a header file within “” and within <>?
Like #import "test.h” Vs #import <test.h>
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It will change the search path for the file. Using <> tells the compiler to look through the system path for the proper file/framework, while using “” tells the compiler that the path is relative to the current file.
For example,
#import <path/to/file.h>will look through the system paths for the file test.h. The paths include /usr/include and /System/Library/Frameworks, where the first component of the path is treated as the framework to start at. Example paths searched are/usr/include/path/to/file.hand/System/Library/Frameworks/path.framework/Headers/to/file.h.#import "path/to/file.h"will only search the current folder, following the path to find the file, meaning only./path/to/file.his searched.