[Mesa-dev] extern "C" sometimes in header files but not always..
Rogovin, Kevin
kevin.rogovin at intel.com
Mon Mar 31 03:55:17 PDT 2014
Hi,
I was doing some experiments and had linking issues with C++ code and saw that some Mesa header files have extern "C" wrappers and others do not. For example running:
$ find src/mesa/main -type f -name "*.h" -exec grep -H -E -o -c "extern \"C\"" {} \; | grep :0 | wc -l
gives a result of 109 files. However, some header files in mesa/main and other places do have the extern "C" { wrapper, such as mesa/main/mtypes.h.
What is the rule, if any, of what files have the extern "C" protection so that the file is suitable for inclusion by C++ source files?
-Kevin
More information about the mesa-dev
mailing list