gimp-vs: gdk headers missing extern "C"



When I use  GDK_TYPE_XXXX macros in VC9 C++, I get linker
errors:

error LNK2019: unresolved external symbol
"unsigned long __cdecl gdk_wm_function_get_type(void)"
(?gdk_wm_function_get_type@@YAKXZ) ...
(i.e. link fails because my compilation unit uses mangled
names)

They go away if I wrap the include directive in my program:

extern "C"{
#include <gtk/gtk.h>
}

But I think this wrap is supposed to be in the headers - the
other packages (ATK_, GTK_, PANGO_ etc.) work OK, using C linkage.

I don't know if this is gimp-vs specific or general.
No big deal, but correcting it would save the next
language-binding-writer some trouble.




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