[EMAIL PROTECTED] wrote: > remove extern "C" in a.h, b.h Glad you found a solution, but I would like to add some things:
- This has nothing to do with g++, any other C++ compiler would have given you the same errors. - Even though you don't strictly need it, you could have included "a.h" into "a.cpp". The compiler then would have told you that the two declarations conflict! - You could also have added the extern "C" to the definitions in the .cpp file. - There is no need for an "extern" in front of a function declaration, you only need to declare variables. Removing the extern "C" is ok though, unless you want to make those files usable in C. Then, you need to supply them to the C++ compiler and exclude them for the C compiler: #ifdef __cplusplus extern "C"{ #endif /* declarations here */ #ifdef __cplusplus } // extern "C" #endif Uli -- http://gcc.gnu.org/faq.html http://parashift.com/c++-faq-lite/ _______________________________________________ Help-gplusplus mailing list Help-gplusplus@gnu.org http://lists.gnu.org/mailman/listinfo/help-gplusplus