#ifndef FOO_H #define FOO_H #ifdef __cplusplus extern "C" { #endif int foo(); #ifdef __cplusplus } // extern "C" #endif #endif