Very strange problem extern "C" {} Does not work
g++ Not working properly
for example:
// a.h
- ifdef __cplusplus
extern “C” {
- endif
void a();
- ifdef __cplusplus
}
- endif
1:
// a.cpp
- include “a.h”
void a(){};
2:
// a.cpp
- include “a.h”
void extern “C” a(){};
1: a() is not available in GCC, 2: is available in GCC.
I do not know why?