This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: GtkSpell Link Error
- From: John Love-Jensen <eljay at adobe dot com>
- To: PEACEYALL <peaceyall at gmail dot com>, GCC-help <gcc-help at gcc dot gnu dot org>
- Date: Thu, 21 Aug 2008 08:50:17 -0500
- Subject: Re: GtkSpell Link Error
Hi PEACEYALL,
Is gtkspell C++ savvy?
You should see something like this in the gtkspell header files if they are
C++ savvy:
----------------------------------------------------------------------
#ifdef HEADERGUARD
#define HEADERGUARD
#include "blah.h" // headers that gtkspell's header depends on
#ifdef __cplusplus
extern "C" {
#endif
//...the meat of the header...
#ifdef __cplusplus
}
#endif
#endif // HEADERGUARD
----------------------------------------------------------------------
If the gtkspell headers are NOT C++ savvy, you'll should instrument them
by-hand with the __cplusplus bits above.
Alternatively (but not recommended by me), you might try to attempt a proxy
header:
my_gtkspell.hpp
----------------------------------------------------------------------
extern "C" {
#include "gtkspell.h"
}
----------------------------------------------------------------------
The reason I do not recommend this approach is because the extern "C" is
also (perhaps incorrectly) applied to any #include headers that gtkspell.h
itself includes, and those headers may get befuddled and you end up in a
much worse mess.
HTH,
--Eljay