Re: GtkSpell Link Error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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


[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux