This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Compiling C++ with 3rd-party C libraries with old-style #includes
- From: Leonid A Broukhis <leob at mailcom dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Fri, 7 Dec 2001 16:16:23 -0800
- Subject: Compiling C++ with 3rd-party C libraries with old-style #includes
I need to compile a C++ program that links with a 3rd-party C library
that supplies the include files in the form
#ifdef __cplusplus
extern "C" {
#endif
extern int func1();
extern char * func2();
...
#ifdef __cplusplus
} /* extern "C" */
#endif
where func1(), func2(), etc. do have some arguments. With egcs-1.1.2
everything compiles and works, but gcc-3.0.2 complains about too many
arguments for func1, func2, etc. -fno-strict-prototypes does not help.
No modification of the 3rd-party include file is possible, neither
a C++ code change that introduces another level of function call -
it is a time-critical part of code. How do I force it to compile?!
Thanks,
Leo