In MSVC ++ #include files are searched differently depending on whether the file is enclosed in "" or <>. The cited form is executed first in the local folder, and then in the / I specified locations. The shape of the angle bracket allows you to avoid the local folder.
This means that in MSVC ++ it is possible to have header files with the same name as the runtime and SDK headers.
So, for example, I need to complete the windows sdk windows.h file to identify a macro that causes problems. With MSVS, I can simply add the (optional) windows.h file to my project, as long as I include it using the quote form: -
// some .cpp file
And in my windows.h I can pull the real one using the brace form:
// my windows.h
Trying this trick with GCC in Xcode failed. the angle bracket # includes in the system header files to actually find my header files with similar names in my local folder structure. The MSVC system means that it is safe to have the header file βString.hβ in my own struct structure. On Xcode, this does not seem to matter.
Is there a way to control the behavior of this search path in Xcode to be more like MSVC? Or I just need to avoid mentioning any of my headers anything that could conflict with the system header. Writing cross-platform code and using multiple frameworks means that the probability of random conflicts seems high.
source share