Using pragma once in a C++ project in Xcode 4
- by Nils
I know that #pragma once is non-standard, however it is supported by most compilers. So on my Mac I can compile C++ code with headers that use #pragma once on the command line using clang++. The strange thing however is that it does not seem to work within Xcode. I get Invalid preprocessing directive when I try to use #pragma once.
I am using the newest version of OSX (10.8.2) and Xcode (Version 4.5.1 (4G1004)).