Re: [Vala] how to call extern function expecting function pointer?



2008/12/9 Adam Dingle <adam medovina org>:
You should declare your delegate static...

Aha - I see.  I've now declared a static delegate, and Vala now generates
the following C code:

  typedef gint (*CompareFunc) (void* a, void* b);
  static void qsort (void* base, gsize count, gsize size, CompareFunc f);

Unfortunately I still receive the same error message:

  top.c:41: error: conflicting types for 'qsort'
  /usr/include/stdlib.h:689: error: previous declaration of 'qsort' was here
You would need to define .vapi file for this particular function and
then use this VAPI.

-- 
/ Alexander Bokovoy



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